cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudius Spellmann <claudius.spellm...@juwimm.com>
Subject CForms making widgets invisible
Date Wed, 22 Sep 2004 10:00:59 GMT
Hi,

I've created a patch to set a visibilitystatus for widgets. This means 
that all widgets can be set visible or invisible on a form when a form 
is created or using flowscript.

Here is an example for making a form invisible when defining the form:
/    <fd:field id="other">
        <fd:label>Andere</fd:label>
        <fd:datatype base="string"/>
        <!-- make the form invisible to the user (This field is optional)-->
        <fd:visible value="false"/>
    </fd:field>/

And here an example to use it in flowscript (only implemented in V2 so 
far)  
/    var form = new Form("someForm.xml");
    var widget = form.getWidget();
   
    // make other visible if invisible
    widget.other.visible = true;

    // make other invisible if visible
    widget.other.visible = false;

    // get the current visibilitystatus for other
    var visibilityStatus = widget.other.visible;/

I've used the latest dev version from the apache svn repository to 
create this patch so currently it only works with the 2.2.0 dev version 
of cocoon.
The appended patch file contains all the changes I've made.

greets
Claudius

By the way  I've seen there are some references to my local filesystem
I hope these references are compatible/wont matter for applying the patch.

Mime
View raw message