cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aron Shamash" <>
Subject RE: Finding length of widget of datatype="string"
Date Tue, 28 Feb 2006 10:45:38 GMT
Hi Simone
Thanks very much for your reply. 
I have tried widget.value.length , but when I print this to the console
it prints:
10:17:55,817 INFO [STDOUT] function length() {/*

int length()


It looks like the content is commented out. 
Any idea why that should be?
How can I edit this length() function?

	Hi Aron,
	yes, AFAIK there is no widget.length, you should use
widget.getValue().length() in java, maybe widget.getValue().length or
widget.value.length in javascript.
	Hope this helps,
	Aron Shamash wrote: 


		Up until now I have always validated length of string
widget using  <fd:length> eg:

		                <fd:length min="4" max="60">

		In this (new) case I only want this validation to be
executed depending on the value of another widget therefore I wanted to
use server-side javascript to find the widget's length. 

		This does not appear to be working for me though. 

		widget.length is undefined. 

		Is this possible? Is there another way around this







		Aron Shamash

		Interface Developer


		Phone 020 7907 4545

		DNA An Avenue A | Razorfish Company


	Simone Gianni

View raw message