You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by H....@MI.unimaas.nl on 2004/10/19 15:07:10 UTC
which events are fired when in repeater widget?
Guys,
I'm in the process of building a sample using dependent selection-lists in a
repeater. It seems I have everything working except for the correct events.
Situation on success:
on change of the selected value in selection-list-1, selection-list-2 is
populated with a new list
on change of the selected value in selection-list-2, field-3 is updated
current situation:
on change of the selected value in selection-list-1, nothing happens
on change of the selected value in selection-list-2, nothing happens
on pressing "add-row" the scripts of selection-list-1 and selection-list-2
are executed and a new row is added.
which events should I use to get the "success" situation?
Bye,
Helma van der Linden
Medical Informatics
University Maastricht
POBOX 616
6200 MD Maastricht
The Netherlands
h.vanderlinden@mi.unimaas.nl
Re: which events are fired when in repeater widget?
Posted by Sylvain Wallez <sy...@apache.org>.
H.vanderLinden@MI.unimaas.nl wrote:
>Guys,
>
>I'm in the process of building a sample using dependent selection-lists in a
>repeater. It seems I have everything working except for the correct events.
>
>Situation on success:
>
>on change of the selected value in selection-list-1, selection-list-2 is
>populated with a new list
>on change of the selected value in selection-list-2, field-3 is updated
>
>current situation:
>
>on change of the selected value in selection-list-1, nothing happens
>on change of the selected value in selection-list-2, nothing happens
>on pressing "add-row" the scripts of selection-list-1 and selection-list-2
>are executed and a new row is added.
>
>which events should I use to get the "success" situation?
>
>
You need to set a <fi:styling on-value-changed="true"> in the template
for the widgets that should trigger the client-side event listeners.
Now that makes me think: what's the proportion of widgets that have an
<fd:on-value-changed> but don't have a <fi:styling
submit-on-change="true"/>? I have the feeling that most of the time
adding a server-side listener implies we also want an automatic submit
when the widget's value changes.
So what about having submit-on-change="true" being implicit when there's
a server-side event listener on a widget? That will require less typing
in the template and avoid questions from confused users :-)
WDYT?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }