cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christofer Dutz" <d...@c-ware.de>
Subject AW: CForms: conditional display of widgets
Date Wed, 07 Jun 2006 11:42:02 GMT
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: christofer.dutz@univativ.de

http://www.univativ.de

 

Darmstadt, Stuttgart, Karlsruhe, Düsseldorf

 

 

 

  _____  

Von: Fernando.Matomira@thomson.com [mailto:Fernando.Matomira@thomson.com] 
Gesendet: Mittwoch, 7. Juni 2006 13:31
An: users@cocoon.apache.org
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


Mime
View raw message