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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Theodore Petrosky Gesendet: Freitag, 8. Februar 2008 18:04 An: Daniele Corti Cc: [email protected] 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 PROTECTED]> wrote: > 2008/2/8, Theodore Petrosky <[EMAIL PROTECTED]>: > > > > 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 protected]) > > Help/Unsubscribe/Update your Subscription: > > > http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com > > > > This email sent to [EMAIL PROTECTED] > > > > > > -- > Daniele Corti > AIM: S0CR4TE5 > Messenger: [EMAIL PROTECTED] > > -- > 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 protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/bw%40condat.de This email sent to [EMAIL PROTECTED] _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
