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
 _______________________________________________
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]

Reply via email to