This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In my application i am using struts 1.3 framework.I am validating the form through xml.I have used the same form in many pages since my inputs are nearly same in all the pages.In one page i need to validate only 4 fields(say) and in another page i need to validate 8 fields.I have validated all the fields in validation.xml.
I am submitting a form with 4 fields to be validated but in xml i have validated 8 fields.So ActionErrors are not empty and the same page loads again.What i need to to validate only the 4 fields and load a new page that is specified.Any way to achieve this? I have googled out but i could not make it.Any help is appreciated.
the one approach is to separate the common fields put it in parent form which child can access. Give the default values to parent form field which are not necessary for the valdiation and keep the validation on the child field.you need to extend the parent form . I dont know whether it will be fit for your design or not.
Second is common define fields in valiation.xml for each form.