|
Phillip
This is not really the same problem; what you seem to be describing
is a fairly standard use case for CForms. The idea of the bean is to
be the "data storage" and (possibly) "post data entry logic processing".
The form definition itself will contain the validation specifications as
to whether or not a field is required, and what label to append to it.
I assume one could store all this info in a single file and then write
custom code to pull it out again & create the form definition ... but
this somewhat goes against the basic Cocoon premise of "separation
of concerns".
Derek
>>> [EMAIL PROTECTED] 2005/11/08 12:01:07 AM >>> Hi, I have a similar problem. Sylvain Wallez wrote: > Jason Johnston wrote: >> Derek Hohls wrote: >> > Is it possible to set up the binding and display for a widget so that >> > it is styled differently depending on whether or not a value was set >> > for it *prior* to displaying the form? >> > >> > I would like to use this approach for a field containing a database >> > field index value - if its blank when the form is displayed, the user >> > must be able to fill it in (and *must* in fact fill it in); >> >> This just means that every field in the form is required="true", right? Is there a way to achieve this with _javascript_ or a fb:custom binding? I have a bean that looks like this: class RepeaterRow { boolean required; String label; String data; [...] } Now I'm trying to figure out how I can bind "required" and "label" to my widget. What's the *right* way to do this or is this not possible with cforms? > That's exactly what I was about to propose: changing the widget's state > on value change is what you're looking for! This doesn't make sure that the user fills in some data :-( Philipp --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice CSIR Copyright, Terms and Conditions For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with "REQUEST LEGAL" in the subject line to CSIR HelpDesk
|
- Re: CForms - different views of the same widget Derek Hohls
- Re: CForms - different views of the same widget Philipp Schmidt
- Re: CForms - different views of the same widget Derek Hohls
- Re: CForms - different views of the same widget Christoph Hermann
- Re: CForms - different views of the same widget Derek Hohls
- Re: CForms - different views of the same widget Christoph Hermann
- Re: CForms - different views of the same widget Sylvain Wallez
- Re: CForms - different views of the same widget Derek Hohls
- Re: CForms - different views of the same widget Craig Gulliver
