AW: WOCheckBox to my instance
AW: WOCheckBox to my instance
- Subject: AW: WOCheckBox to my instance
- From: "Weide, Björn" <email@hidden>
- Date: Fri, 8 Feb 2008 18:03:50 +0100
Hi,
please ensure that you have the checkbox inside a WOForm tag (and that you
are submitting this form).
Ciao,
Bjoern
-----Ursprüngliche Nachricht-----
Von: webobjects-dev-bounces+bw=email@hidden
[mailto:webobjects-dev-bounces+bw=email@hidden] Im Auftrag von
Theodore Petrosky
Gesendet: Freitag, 8. Februar 2008 18:04
An: Daniele Corti
Cc: email@hidden
Betreff: Re: WOCheckBox to my instance
So, If I understand your suggestion:
allOrOpenOnlyCheckBox: WOCheckBox {
value = "true";
selection = allAdsBool;
}
I am trying this now... but when I click the checkbox I do not see the NSLog
fire.
Ted
--- Daniele Corti <email@hidden> wrote:
> 2008/2/8, Theodore Petrosky <email@hidden>:
> >
> > I have a WOCheckBox in my Component and I am
> trying to
> > bind it back to the app. I have this in my WOD
> >
> > HTML
> > <webobject name="allOrOpenOnlyCheckBox" />
> >
> >
> > WOD
> > allOrOpenOnlyCheckBox: WOCheckBox {
> > checked = allAdsBool;
> > }
>
>
> Ehm, I usually don't use this binding, I prefer the couple value and
> selection, that give the possibility to use pass a determined string.
>
> WOO:
> allOrOpenOnlyCheckBox: WOCheckBox {
> value = "true";
> selection = mySelectioin;
> }
>
>
>
> And this in my .java:
> >
> > public Boolean allAdsBool;
> >
> > public Boolean allAdsBool() {
> > return allAdsBool;
> > }
> >
> > public void setAllAdsBool(Boolean newBool) {
> > NSLog.out.appendln("setAllAdsBool = " +
> newBool);
> > allAdsBool = newBool;
> > }
>
>
>
> Java:
> private String _mySelection;
>
> public String mySelection()
> {
> return _mySelection;
> }
>
> public void setMySelection(String myString) { _mySelection = myString;
> }
>
> public boolean isChecked()
> {
> return new Boolean(mySelection()).booleanValue();
> }
>
>
>
> If I click the checkbox on the rendered page, the
> > setter is not called. What am I doing wrong?
> >
> > Ted
>
>
> In your action you can call isChecked() to see if the checkbox was
> checked, or use the string mySelection() (for example to save in the
> db a boolean
> value)
>
>
>
____________________________________________________________________________
________
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile. Try it now.
> >
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will
> be ignored.
> > Webobjects-dev mailing list
> (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
>
> >
> > This email sent to email@hidden
> >
>
>
>
> --
> Daniele Corti
> AIM: S0CR4TE5
> Messenger: email@hidden
>
> --
> Computers are like air conditioners -- they stop working properly if
> you open WINDOWS
>
> --
> What about the four lusers of the apocalypse? I
> nominate:
> "advertising", "can't log in", "power switch" and "what backup?"
> --Alistair Young
>
____________________________________________________________________________
________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden