cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Morandini <luca.morandi...@tin.it>
Subject Re: Woody
Date Thu, 24 Apr 2003 13:18:13 GMT
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 ?


> 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 :(

Regards,

---------------------------------------------
                Luca Morandini
                GIS Consultant
               lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------



Mime
View raw message