• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOCheckBox to my instance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOCheckBox to my instance


  • Subject: Re: WOCheckBox to my instance
  • From: "Daniele Corti" <email@hidden>
  • Date: Fri, 8 Feb 2008 17:52:08 +0100



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)



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

  • Follow-Ups:
    • Re: WOCheckBox to my instance
      • From: Theodore Petrosky <email@hidden>
References: 
 >WOCheckBox to my instance (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re: LazyGenericRecordBinding
  • Next by Date: Re: Dealing with relationships and inheritance
  • Previous by thread: WOCheckBox to my instance
  • Next by thread: Re: WOCheckBox to my instance
  • Index(es):
    • Date
    • Thread