Hi Friends,
I have created a web using spring mvc.
I have a field in web page called
Favourite Web Frameworks: checkbox
struts checkbox springmvc checkbox hibernate
My requirement is
label will be "Struts"
value is "struts"
label will be "Spring MVC"
value is "springmvc"
Trial 1 - starts
I have create a class called
"Framework.java"
In UserRegistrationFormController.java,
In UserRegistration.jsp,
Now when i try to submit the form,form is not submitted and "invalid data" is thrown.
Trial 1 - ends
Trial 2 - starts
So I tried the other way,instead of using "Framework" class,I used "String" class.
In UserRegistration.jsp,
Here web page displayed checkboxes for springmvc,struts1,struts2,
jsf,apachewicket.
here both label and value of check box are same.when form is submitted it is working.
But here we cannot achieve, label displayed in web page to be different with actual value
As label should be more readable and value of a label will not be same
for eg:-
Label is "Spring MVC" (displayed to user)
value is "springmvc" (actual value for processing).
I used Trial 1 (mentioned above).But "invalid data" in red font is coming.
I googled for the issue.Cannot able to find the suggesstions.
Please guide me in this issue.
Regards,
Anand