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:text></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

Reply via email to