cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Question and Suggessions about forms block in 2.1.6
Date Fri, 26 Nov 2004 11:50:17 GMT
roy huang wrote:

>Hi,Sylvain:
>    I have thought about invisible state,and studied the mail archive about widget's state.
>    Is it now I can't just use flowscript to hide a widget ?
>  
>

Sorry, I don't understand the question. Are you asking how to hide a
widget in flowscript?

First, you have to make the WidgetState class visible:
importClass(org.apache.cocoon.forms.formmodel.WidgetState);

then you can use one of the constants defined by that class to set the
state of a widget.

form.lookupWidget("my-field").setState(WidgetState.INVISIBLE);

Note that this is not limited to the flowscript, and can only be used in
event handlers.

Hope this helps.
Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message