cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: Woody
Date Thu, 24 Apr 2003 18:23:57 GMT
On Thu, 2003-04-24 at 15:18, Luca Morandini wrote:
> Bruno Dumon wrote:
> > The case of e.g. disabling a list box based on the state of checkbox
> > made me think that if in the form definition this dependency is defined,
> > the framework could automatically generate the necessary event listeners
> > etc to do this, and this part is more complex than the validation rules.
> > 
> Really ?
> I solved this by just adding a series of "action" elements containing 
> the Javascript event to listen to and the Javascript statement to 
> execute, like in:
> <formdecl:field	id="opendate" type="date"
> 	mandatory="true"
> 	editable="true"
> 	allowed-edit-roles="sm ar cm">
> 	<formdecl:bounds min="01-01-2001" max="31-12-2005"/>
> 	<formdecl:actions>
> 		<formdecl:action event="onChange"
> 			function="onChangedForm()"/>
> 	</formdecl:actions>
> </formdecl:field>
> ...or had you something better in mind ?

Yeah, what I had in mind was that one could define something like this
on a component X:

enabled="mycheckbox = true"

and then the framework would be smart enough to add an eventlistener on
the "mycheckbox" control which disables the component X when

> > I've got to say though that all this client-side javascript things are
> > not a high priority for me personally.
> > 
> Hmmm... if you happen to develop complex forms, users (in my experience) 
> will eat you alive if you don't provide them with fast feedback and 
> "reactive" forms :(

Depends a lot on the use-case of course. I guess these are mostly on
intranets? If anyone knows of a good public example, I'd be interested
to see it.

Also, when I'm saying it's not a high priority for me, it means that I
probably won't be doing any coding on it in the short-term, but I'll
keep it in mind when making design decissions.

Bruno Dumon                   
Outerthought - Open Source, Java & XML Competence Support Center                

View raw message