cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aron Shamash" <Aron.Sham...@dna.co.uk>
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,
	Simone
	
	
	Aron Shamash wrote: 

		Hi

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

		                <fd:length min="4" max="60">
	
<fd:failmessage><i18n:text>slb.addressOneSecondApplicant.length</i18n:te
xt></fd:failmessage>
		                </fd:length>  

		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
problem?

		 

		 

		

		

		

		

		Aron Shamash

		Interface Developer

		

		Phone 020 7907 4545

		DNA An Avenue A | Razorfish Company

		www.dna.co.uk

		 

	-- 
	Simone Gianni
	


Mime
View raw message