Re: BeanValidation-Plugin
Hi, sry got some Problem to create a issue, think u see it. sry (my first time). Pull Request created. Regards Hedju Hor On 2018-01-08 22:22, Johannes Geppert wrote: > Hi, > > If you already found a solution for this issue it would be create if you > maybe can create a Issue and a PR so we can integrate it in the Struts code > base. > http://struts.apache.org/submitting-patches.html > > Best Regards > > Johannes > > # > web: http://www.jgeppert.com > twitter: http://twitter.com/jogep > > > 2018-01-08 21:11 GMT+01:00 Hedju Hor : > > > Hi, i'm using a action with ModelDriven and multiple action methods. > > > > For Validation the Model i'm using the 'Bean Validation Plugin' but the > > current Version does not support 'Grouping Constraints' described in > > https://docs.jboss.org/hibernate/validator/5.1/ > > reference/en-US/html/chapter-groups.html > > > > Is there already a Solution for that or i have to write my own > > BeanValidationInterceptor? > > (btw already done ist) > > > > > > Regards > > > > Hedju Hor > > > > > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
BeanValidation-Plugin
Hi, i'm using a action with ModelDriven and multiple action methods. For Validation the Model i'm using the 'Bean Validation Plugin' but the current Version does not support 'Grouping Constraints' described in https://docs.jboss.org/hibernate/validator/5.1/reference/en-US/html/chapter-groups.html Is there already a Solution for that or i have to write my own BeanValidationInterceptor? (btw already done ist) Regards Hedju Hor - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Annotation validation setter level
Hi, use @VisitorFieldValidator 1. in Action-Class annotad gettter Method of the model with @VisitorFieldValidator 2. @EmailValidator on getter in Model Person.getEmail see https://depressedprogrammer.wordpress.com/2007/05/10/struts-2-validation-using-annotations/ Regards Hedju Hor On 2018-01-05 19:50, José Antonio Delgado Trujillo wrote: > Annotations validations an alternative way of XML validation or the simplest > way to implement the validate method. > > Yo have two options: > At method level > At setter level > > In the second if you donât have the setter in the Action class because it > is a property of an object, where do i put the annotation. I think it would > be in the model class but it doesnât work. > > I explain better with a example. > Person class have email property and the action class has a field of > Personâs type. So the setter method is for Person not for email. If i want > to use @EmailValidator in a setter level where does it put the annotation? > > > Un saludo, > José A. > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to pass data from one Action class to another Action class?
Hi, redirect Action with parameters https://struts.apache.org/core-developers/redirect-action-result.html or use Session https://struts.apache.org/getting-started/http-session.html Regards Hedju Hor On 2018-01-06 08:03, Akash khare wrote: > first action class code > getRequest().setAttribute("RncPartnerID", model.getId()); > > 2nd action class code > String rncPartnerId=(String)getRequest().getAttribute("RncPartnerID"); > RncPartnerData rncPartnerData = new RncPartnerData(); > rncPartnerData.setId(rncPartnerId); > rateCardData.setRncPartnerData(rncPartnerData > > > > i am using this > > > > > > Thanks and regards > Akash khare > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org