Hi Fernando,

 

use the JX-Templates. In Order to make Cforms work you have to ad the following as child of the templates root:

            <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>

And then stop using the forms generator but to use a normal resource or ile generator and use the Forms transformer:

            <map:transform type="forms"/>

Then all you can do the following:
            <jx:if test="${(widget.getChild('curUser_departmentId').getValue() == widget.lookupWidget('view/contact/gst').getValue()) &amp;&amp; (widget.lookupWidget('imported').getValue() == false)}">

                        <ft:widget id="save"/>

            </jx:if>

 

Hope this helps.

Oh just forgot … don’t forget to declre the jx-namespace

xmlns:jx=http://apache.org/cocoon/templates/jx/1.0

 

Regards, Chris

 

[ c h r i s t o f e r   d u t z ]

 

IT-Berater

univativ GmbH & Co. KG

Robert-Bosch-Str. 7, 64293 Darmstadt

 

fon: 0 61 51 / 66 717 - 21

fax: 0 61 51 / 66 717 - 29

email: [EMAIL PROTECTED]

http://www.univativ.de

 

Darmstadt, Stuttgart, Karlsruhe, Düsseldorf

 

 

 


Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 7. Juni 2006 13:31
An: [email protected]
Betreff: CForms: conditional display of widgets

 

How can I do to display a certain widget in a form only if a specific condition is met?

 

Depending on the value of a drop-down menu in the form, another widget should be displayed or not,

dynamically, not only when the form is first presented.

 

Thanks