Hi Mike,

When you bind the SetSelectedItem() method to onClick, since onClick is a client action and not a WO action, you're telling WO to call SetSelectedItem() to determine the String to place in the HTML, i.e. onClick="<result of SetSelectedItem()>". Since I doubt SetSelectedItem is returning a String, this is not what you really wanted.

You can set the "checked" binding, then have your onClick submit your form, or something along those lines.

FYI, the method name "SetSelectedItem" is not standard, with the initial upper case, and is confusing with the standard practice of having am item(), or getItem(), and setItem() pair of methods. (WO actually expects this convention to be followed.)

Hope this helps!

Regards,
Mark

On Oct 24, 2006, at 3:44 PM, Chip Myers wrote:

Hi, I'm having trouble combining a WOCheckbox and WORepetition. I have a method named SetSelectedItem(), which adds or removes an element of the WORepetition to an NSMutableArray. I've added an onClick attribute to my WOCheckbox, which calls SetSelectedItem()

My problem occurs here: whenever the page first loads, the SetSelectedItem method is called at each iteration of the WORepetition, before I even begin to move my mouse near it to click/ unclick it. Is there anyway to avoid this??


Thanks,
Mike

_______________________________________________
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