cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wouter.DERU...@cec.eu.int
Subject Woody: dependent widget
Date Thu, 20 Nov 2003 13:21:53 GMT
Hello,

I would like to integrate into Woody the possibility that the visibility of
a widget depends on the value of another. An example:  when i click for
instance a check box , a "unvisible widget" is made visible (with
Javascript)  In general,  certain questions in my form must only appear when
a user has chosen a certain value in a question above.
Therefore I would like to add some attributes in my widget definition to
indicate that a certain "item value" points to another widget. I need these
additional attributes in order to generate the Javascript afterwards. For
instance in the following example, if the user choses item value "option1"
then and only then question 2 should appear:

<wd:multivaluefield id="question1">
      <wd:label>question 2 text</wd:label>
 	<wd:datatype base="string"/>
	<wd:selection-list>
	 <wd:item value="option1" id="001" point="question2"/>
	 <wd:item value="option2"/>
	 <wd:item value="option3"/>
	</wd:selection-list>
</wd:multivaluefield>

<wd:field id="question2" ispointed="001">
   <wd:label>question 2 text:</wd:label>
   <wd:datatype base="long"/>
</wd:field>


When I add these attributes however in my form definition file they are not
preserved by the woody transformer when he produces his form instance.  What
should I modify (Java classes , stylesheets, ..)  in order to have my
additional attributes preserved?  
If anyone has implemented the same type of functionality perhaps with a
different approach I will be glad to hear from you.

thanks,
wouter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message