cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Wyles <>
Subject [CForms] Dynamically setting 'required' attribute
Date Thu, 20 Jan 2005 12:30:30 GMT

I have a form in which I need to dynamically set the required attribute 
of certain fields. The form itself is created dynamically from a bean 
using <fd:union/> and such in the form definition file and  <fb:case/> 
in the binding file. This all works great, but  after looking at the 
api docs I have been unable to find a way to dynamically set the 
required attribute of the field itself after the form model has been 

Currently I am having to dynamically add a custom validator to each 
field which is determined to be required, I also dynamically set a 
field attribute that is processed by my forms styling XSL, so that the 
field is rendered as required on the front-end.

Can anyone tell me how I might be able to dynamically set the required 
attribute of the field directly?

I am considering the possibility of dynamically creating the form model 
or definition in java, but I am not sure whether this route is 
advisable - if anyone can point me to examples of this I would 
appreciate it!



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message