Women in Technology

Hear us Roar



Article:
  Using the Validator Framework with Struts
Subject:   Struts validations, Page attribute
Date:   2007-04-14 07:32:30
From:   foeby
Hi,
I need some clarity on the page attribute in struts validations.
I have a page with 3 buttons. I want my jsp to validate only for one submit button. On clicking this one submit button i make my page value equal to g1 because i have page=h1 in validation.xml. And for the other 2 submit buttons, i first invoke a java script function where i make page equal to g2 so that no validations take place since for all submits i have same action mapping. But despite making page value greater than g1 for which alone validations should occur, why are the validations happening for all submit buttons and not just for the one for which page is g1 . Kindly suggest a solution with some explanation as to why the current approach is not working.



Thanks,
Foeby