K Amin

Greenhorn
+ Follow
since Oct 11, 2007
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 K Amin

Thanks Lassy,

I have been trying to use "validwhen" but I couldn't get it work. I am sending you the code, if you can help me what to write in validation.xml that will be great

<tr>
<td><bean:message key="label.changepassword"/></td>
<td><html:checkbox property="changePassword" /></td>
</tr>
<tr>
<td><bean:message key="label.password"/></td> </td>
<td><html assword property="password" /></td>
</tr>
<tr>
<td><bean:message key="label.passwordagain"/></td>
<td><html assword property="passwordagain" /></td>
</tr>

Thanks
14 years ago
Can anybody help me with this kind of valadition which has a checkbox and 2 password input fields, if the checkbox is checked then password filds are required otherwise not. For other forms in this application I am using client-side validation.

Thanks in advance
14 years ago
Can any body give me a little example, how to validate for picking up a specific value from a dropdown list, the dropdown list is generated with some file names from a folder location. I am using client site validation for other form fields.

Thanks
14 years ago
There is a tutorial in myeclipse. You can try that. or you can try here...
http://www.laliluna.de/first-steps-using-struts-tutorial.html
14 years ago
Thanks Merrill,

Yes the password checks is working fine with validwhen. But I am having problem with displaying message in window alert. Here is my code, 1st 3 requied field displays fine in pop-up window, but when it comes to validwhen, it dosn't. Again if both passwords are same it works fine. If anybody can help me, that will be great.

<form name="changePasswordForm">
<field property="oldpassword" depends="required">
<arg0 key="label.oldpassword"/>
</field>
<field property="newpassword" depends="required">
<arg0 key="label.newpassword"/>
</field>
<field property="newpasswordAgain" depends="required,validwhen">
<arg0 key="label.newpasswordAgain" />
<msg name="validwhen" key="Both new password should be same."/>
<var>
<var-name>test</var-name>
<var-value>((newpassword == newpasswordAgain) or (*this* == newpassword))</var-value>
</var>
</field>
</form>

Thanks again....
14 years ago
Thanks John.
I know how to compare 2 fields in java script. But the thing I dont know how to use this javascript function with struts validation, cause other fields of the same form is validated by struts validation. Any suggestion will be appreciated. thanks again.
14 years ago
Hi all,

I have a form that has a dropdowm list. If user picks a specific value from that dropdown list, I need to check another field in the form with a value greater than zero. For all other picks from the dropdown, I don't have to worry. Any suggestion will be very helpfull.

And also I am using client side validation, If any body can suggest me how to check two password field is same or not, that will be great.

Thanks in advance..........
[ October 17, 2007: Message edited by: K Amin ]
14 years ago
Hi,
I am very new to Struts. I have been using an ActionForward Delete function to delete data from a db table. I need to pop up a confirmation window for delete. If any body can help me with this, it will be great.
14 years ago