cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maria Grigorieva <mag-s...@hotmail.com>
Subject Cocoon 2.1.11 forms validation "on-value-changed"
Date Sun, 07 Feb 2010 23:14:10 GMT

Hello, dear mailing-list )

Please help if it's possible: I have a form-model with widgets and the
values of the fields 

passes to the database "on-value-changed" action (I haven't any "Submit"
buttons at all)

And for each field I have the validation rules:

<fd:field id="density" required="true">
		<fd:label>Density</fd:label>
		<fd:datatype base="float">
			<fd:convertor type="plain" />
		</fd:datatype>
		<fd:validation>
			<fd:range min="0" max="5000">
				<fd:failmessage>ERROR!!!</fd:failmessage>
			</fd:range>
		</fd:validation>
		<fd:on-value-changed>
			<javascript>
				var value = event.source.value;
				var form =  event.source.form;
                             var id = new
java.lang.Integer(form.getAttribute("id").intValue());
				matmodel.setR0(id,value);
		</javascript>
		</fd:on-value-changed>
	</fd:field>

Please, help! How can I use the validation rules to show the message to the
user on-value-changed action ??? 


-- 
View this message in context: http://old.nabble.com/Cocoon-2.1.11-forms-validation-%22on-value-changed%22-tp27493446p27493446.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message