R
rajakraja99
Hi
Could you help me out to work with the struts-validator Frame work for
client side validation( javascript) in JRun4?
The problem is that
The ordinary FormBean created by extending ActionForm Works fine on
server side validation. But if the validator frame is included, it
doesn't work on both (client and server) sides.
In the mean time, the same code goes well on Tomcat.
If the source code is viewd for the dyanmically generated javascript
functions on JRun, they are being preceded by the 'nameoftheform_'. But
the object that we create is only for the function name.
For example if the form name is 'TestForm' and the function name is
'required()',
the dynamically generated function would look like
'TestForm_required()'.
But in the validator-rules.xml, we call this function as oRequired=new
required(). So obviously its going to throw an exception stating
'required' is undefined.
Also the key, value pair associated in the
ApplicationResources.properties is not fetched for the validation.xml
field arg
They are just seen as null in the source view.
ie) For the field 'name' in the validation.xml
<field property="name" depends="required"
arg0 key="prompt.name"/>
the value in ApplictionResouces.properties
is prompt.name=Name.
but the dynamically created function looks like this
function searchForm_required () {
this.a0 = new Array("name", "null is required.", new Function
("varName", " return this[varName];"));
where null must be the value "Name".
So could you kindly let me have any links to resolve this problem? Any
tips regarding this kindly welcome.
Thanking you.
Could you help me out to work with the struts-validator Frame work for
client side validation( javascript) in JRun4?
The problem is that
The ordinary FormBean created by extending ActionForm Works fine on
server side validation. But if the validator frame is included, it
doesn't work on both (client and server) sides.
In the mean time, the same code goes well on Tomcat.
If the source code is viewd for the dyanmically generated javascript
functions on JRun, they are being preceded by the 'nameoftheform_'. But
the object that we create is only for the function name.
For example if the form name is 'TestForm' and the function name is
'required()',
the dynamically generated function would look like
'TestForm_required()'.
But in the validator-rules.xml, we call this function as oRequired=new
required(). So obviously its going to throw an exception stating
'required' is undefined.
Also the key, value pair associated in the
ApplicationResources.properties is not fetched for the validation.xml
field arg
They are just seen as null in the source view.
ie) For the field 'name' in the validation.xml
<field property="name" depends="required"
arg0 key="prompt.name"/>
the value in ApplictionResouces.properties
is prompt.name=Name.
but the dynamically created function looks like this
function searchForm_required () {
this.a0 = new Array("name", "null is required.", new Function
("varName", " return this[varName];"));
where null must be the value "Name".
So could you kindly let me have any links to resolve this problem? Any
tips regarding this kindly welcome.
Thanking you.