praveen moturi

Greenhorn
+ Follow
since Aug 20, 2009
Merit badge: grant badges
For More
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 praveen moturi

thanks for reply


what additionaly information is needed sorry i cant understand iam extending action support class for my action class
and validation.xml in which iam validating my form fields

there are some select boxes in which required vlidation is not working but iam trying other way as min length validation for that

my code is as follows

validator.xml

<field name="registrationFormBean.nationalityId">
<field-validator type="int">

<param name="Min">1</param>
<message> Nationality Is Required </message>
</field-validator>

jsp code follows


<s:select name="registrationFormBean.nationalityId"
list="#session.NationalityList"
listKey="nationalityId"
listValue="nationalityName"
headerKey="0"
headerValue="---select---"
label="Ntionality" />


the field nationlityId in the bean is of type int

even though i try to validate the field with required it is not validating thats why iam using min length validator instead of required

on more important thing is old errors are not clearing up in the jsp ,the message are adding up


can any please explian to solve the issue i might i have missing some thing is there any additional information i need to post for more clarity



13 years ago
please help me thanks in advance
hi iam using struts2 validation.xml for validating the form some times the action is directly submitted witout validating

the validation is not working.this is the code in struts.xml

<action name="AddRegistration" method="addAcceptRegistrationForm"
class="registration.action.RegistrationAction">
<interceptor-ref name="defaultStack">

</interceptor-ref>
<result name="input" type="redirect">/Resources/registration/addRegistrationForm.jsp</result>
<result name="error">/Resources/registration/Error.jsp</result>
<result>/Resources/registration/Success.jsp</result>
</action>



and one more problem which i already posted earlier was the old errors are not getting cleared instead it adds up iam not using springs is there any suggestion what the changes i need to make or where can i remove the old errors
13 years ago

praveen moturi wrote:hi iam new to struts2 . iam using Xx-validation.xml while validating the fields are getting validated
but each time a new a message is added for the same field
for example name
message : Enter your name
when i submit the page without giving any value in the name field
this time i will get two error messages
Enter your name
Enter your name

can any please help me




i am using struts2.x with hibernate


my problem is that in the jsp when i submit again without entering any thing in required field this time two messages
will be displayed like "field require" "field required"
for the third time "field require" "field required" "field required"
validation is working instead of one message the messages are getting piled up
14 years ago
hi iam new to struts2 . iam using Xx-validation.xml while validating the fields are getting validated
but each time a new a message is added for the same field
for example name
message : Enter your name
when i submit the page without giving any value in the name field
this time i will get two error messages
Enter your name
Enter your name

can any please help me
14 years ago