Anyway, this seems to be getting me somewhere...
1) bind checkbox's name attribute to a unique key in the child
component.
2) parent keeps a list of child components that need updating during
takeValuesFromRequest
3) child registers itself after appendToResponse.
Hmm... interesting. Thanks for pointing that out. But I don't
think that's it.
Check and see what is going back to the server in terms of form
values when you submit the form. The fix, IIRC, is to put a
dummy hidden field in the form so that WO processes takeValues.
The strange thing is that in a dummy test app I've just made, it
too only has checkboxes in the form but even if I make no
changes to the form the child component still has its setter
methods called during the takeValuesFromRequest phase. But in my
app-proper it's being skipped.
I've tried putting in the hidden field, but that didn't help -
so something else is skewed :-/
I'll try turning on DebugGroupComponents,
DebugGroupRequestHandling...
The first is a hidden field string, second is the button, the last
is the value of the single checkbox (if ticked) otherwise if not
ticked it's not included.
That all looks good.
Forget to call super.takeValues someplace?
Not that I can see. But I might need to strip things (in terms of
component hierarchy to see what's happening).
A missing call to super is all that I can think of. That or
something in your component is messing with the element ID so it
does not match up to the right object on the way back in.
On Jul 30, 2007, at 6:05 PM, Lachlan Deck wrote:
okay this is a little weird, from my understanding of WO...
I have a page with a form and in the form is a repetition of a
sub-component which has a checkbox and associated logic with
that checkbox.
So something like this:
<page>
<webobject name="Form">
<webobject name="ListItem"/> <!-- has a checkbox -->
</webobject>
</page>
However, when ticking or unticking the checkbox in any of the
ListItem components (where I've bound checked = isSelected)
I'm finding that setIsSelected is not being fired in the
subcomponent.