You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jim Horner <jh...@arinbe.com> on 2004/01/11 07:11:42 UTC
[Woody] Select List inside Repeater Widget
Hi,
Has anyone tried or is it possible to use a selection list inside a repeater
widget that changes a second selection list inside the same repeater widget?
I don't know how to better describe it. An example, I have a page which
allows the user to fill in Part data, name, number, etc. At the bottom of the
page I would like the user to be able to input alternate parts. The alternate
parts is the repeater. Inside the alternate parts is two selection lists. One
is a part name and the other is a part number. When the user changes the part
name, the part number selection list will fill in. This is similar to the car
selector example; make/model except in a repeater.
The problem is when <wi:styling submit-on-change="true" /> fires, the
flowscript errors out with
java.lang.IllegalArgumentException: Invalid submit id (no such widget):
alternateParts.0.alt.partName
If this is not possible that is fine. I think I am getting a little carried
away with all of the power of flowscript and woody. I'll have to display the
input a bit different is all.
Below is a snippet of my definition. I also just realized the javascript is
wrong because I don't know the name of the widget, for example,
alternateParts.0.alt.partName; I won't know the 0 or 1 or 2, etc to fill in
the part numbers row selection list. I'm thinking what I am trying to do is
not possible.
Thanks,
Jim
<!-- Alternate Parts -->
<wd:repeater id="alternateParts">
<wd:label>Alternate Parts</wd:label>
<wd:widgets>
<wd:output id="alt.partOid">
<wd:datatype base="string"/>
</wd:output>
<wd:field id="alt.partName" required="true">
<wd:label>Part Name</wd:label>
<wd:datatype base="string" />
<wd:selection-list
src="cocoon:/selector-partNames.xml"
dynamic="true"/>
<wd:on-value-changed>
<javascript>
[snip]
</javascript>
</wd:on-value-changed>
</wd:field>
<wd:field id="alt.partNumber" required="true">
<wd:label>Part Number</wd:label>
<wd:datatype base="string"/>
<wd:selection-list>
<wd:item value="">
<wd:label>Select a part name first.</wd:label>
</wd:item>
</wd:selection-list>
</wd:field>
<wd:booleanfield id="alt.select">
<wd:label>Select</wd:label>
</wd:booleanfield>
</wd:widgets>
</wd:repeater>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org