cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 黄 海冬 <lingererhu...@hotmail.com>
Subject Re: Question and Suggessions about forms block in 2.1.6
Date Sun, 28 Nov 2004 15:47:06 GMT
Hi Sylvain:
  I tried this before but failed(see my first mail in this thread),but 
today I found the key:
  I change import url in jx_template from
  <jx:import 
uri="resource://org/apache/cocoon/forms/generation/template.jx"/>
  to:
  <jx:import 
uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
  the state invisibled work.
  jx-macros.xml is the new file in 2.1.6,can it replace template.jx?

Roy Huang
  
>From: Sylvain Wallez <sylvain@apache.org>
>Reply-To: dev@cocoon.apache.org
>To: dev@cocoon.apache.org
>Subject: Re: Question and Suggessions about forms block in 2.1.6
>Date: Fri, 26 Nov 2004 12:50:17 +0100
>
>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 }
>

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  


Mime
View raw message