Padmini Nagarajan

Greenhorn
+ Follow
since May 26, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Padmini Nagarajan

Hi,

Can validwhen be used to compare 2 date fields? Have a date field. Need to compare if the value entered in tht field is greater than current date.
As of now am having them as string and this does not work.
Please let me know wht to do

Thanks
Padmini
16 years ago
Hi Alan,

Thanks for the reply. Tried validWhen rule and it works. But I still have a problem in displaying the error message.I am displaying a generic message like "Field XXX is not within the range,Please enter again" but now I need to display
a message like "Field XXX is not in the range ZZZ and YYY" Where ZZZ and YYY would again be dynamically generated values.
16 years ago
Hi,

I have a jsp page with some fields say AA,XX , YY, ZZ
and 2 buttons say Submit and validate.
On click of submit button All fields AA,XX,YY and ZZ are mandatory
And on click of validate button only AA and ZZ are mandatory..
I know tht we can set different actions like this
document.forms[0].action='DDD.do'; and submit the form

I have enabled javascript validation for my form.. and need to trigger client side validation ..
With this senario, How do I define my validation.xml such tht user is prompted to fill the required fields on click of the respective buttons..
17 years ago
Am using struts validator framework which combines with javascript.
So in my jsp is defined as follows
<html:html>
<body>
<html:form action="/confirmDeal.do" onsubmit="return validateForm(this);">
.
.
</html:form>
<html:javascript formName="/confirmDeal" dynamicJavascript="true" staticJavascript="true" method="validateForm"/>
</body>
</html:html>

My formbean extends from ValidatorActionForm

Is there any way to dynamically change the formName to something else in
<html:javascript />

Thanks
Padmini
17 years ago
Struts validator framework provides us with and intRange validation and can be used as below. My doubt here is , is there anyway that var-value can refer to a property instead of hard coded values like 10, 20 etc.
i.e I want to validate the range against another form property .

<field
property="integer"
depends="required,integer,intRange">
<arg0 key="typeForm.integer.displayname"/>
<arg1
name="intRange"
key="${var:min}"
resource="false"/>
<arg2
name="intRange"
key="${var:max}"
resource="false"/>
<var>
<var-name>min</var-name>
<var-value>10</var-value>
</var>
<var>
<var-name>max</var-name>
<var-value>20</var-value>
</var>
</field>
17 years ago