On Thu, 2003-11-20 at 14:21, [EMAIL PROTECTED] wrote:
> 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.

I think your problem is a completely client-side related one, so is more
related to the template than the definition. In the template, you can
add any tags inside the wt:widget element and they will be preserved, so
that you can use them in the XSLT.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to