Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-25 Thread Umesh Awasthi
Hi Bruce,

I will be more than happy , let me know if i can contribute in any form?
I also need to update Github information as still XML based validation
information is missing from there.

Thanks
Umesh


On Sat, Oct 26, 2013 at 3:48 AM, Paul Benedict  wrote:

> JSR-303 validation should be the norm for Struts 3.
>
>
> On Fri, Oct 25, 2013 at 1:53 PM, bphill...@ku.edu 
> wrote:
>
> > Works now - thank you for the help and for creating a very useful plugin.
> >
> > Would you mind if I wrote an article about how to use this plugin for my
> > blog (http://www.brucephillips.name/blog)?
> >
> > Bruce
> >
> >
> >
> > --
> > View this message in context:
> >
> http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714436.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>
>
> --
> Cheers,
> Paul
>



-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-25 Thread Paul Benedict
JSR-303 validation should be the norm for Struts 3.


On Fri, Oct 25, 2013 at 1:53 PM, bphill...@ku.edu  wrote:

> Works now - thank you for the help and for creating a very useful plugin.
>
> Would you mind if I wrote an article about how to use this plugin for my
> blog (http://www.brucephillips.name/blog)?
>
> Bruce
>
>
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714436.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Cheers,
Paul


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-25 Thread bphill...@ku.edu
Works now - thank you for the help and for creating a very useful plugin.  

Would you mind if I wrote an article about how to use this plugin for my
blog (http://www.brucephillips.name/blog)?

Bruce



--
View this message in context: 
http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714436.html
Sent from the Struts - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-25 Thread Umesh Awasthi
Hi Bruce,

Only thing you were missing is to tell Underlying bean Validator to
validate your bean.
You placed constraints on your Person bean , but you need to indicate that
you want to validate this bean

In you EditAction.java you need to add @Valid annotation like

@Valid
 private Person personBean;

Thanks
Umesh




On Fri, Oct 25, 2013 at 7:05 PM, bphill...@ku.edu  wrote:

> I've modified one of my form processing example applications to include
> this
> plugin.  It is not working as it allows you to not enter a value for first
> name even though I've annotated it with @Size(min=5).
>
> I double-checked that I'm following all the steps you listed in your
> ReadMe.md file at GitHub but it very possible I missed something.
>
> Could you look over this project:
> http://www.stfm.org/test/jsr303_validation.zip (unzip it - it's Maven
> project) and let me know what I've not done correctly.
>
> Thank you,
>
> Bruce Phillips
>
>
>
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714434.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-25 Thread bphill...@ku.edu
I've modified one of my form processing example applications to include this
plugin.  It is not working as it allows you to not enter a value for first
name even though I've annotated it with @Size(min=5).

I double-checked that I'm following all the steps you listed in your
ReadMe.md file at GitHub but it very possible I missed something.

Could you look over this project: 
http://www.stfm.org/test/jsr303_validation.zip (unzip it - it's Maven
project) and let me know what I've not done correctly.

Thank you,

Bruce Phillips




--
View this message in context: 
http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714434.html
Sent from the Struts - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



"DelegatingValidatorContext.getText and Jetty

2013-10-25 Thread Umesh Awasthi
Hi All,

I have not worked much with jetty so not sure if my approach is correct or
not.
I am testing my application and few validation use cases on Jetty, though
validation is working correctly but when it come to resolve those error
messages with underlying Resource bundle its not working correctly

I have following property in my action class

 @NotBlank(message="not.blank")
   private String name;

I have one property file with same name as my action class and in same
directory with following entry

not.blank=Field can not be empty

This is how i am trying to get value against key in my code

 ValidatorContext validatorContext = new DelegatingValidatorContext( action
);
  message = validatorContext.getText(key);

here key being passed is "not.blank", but it is unable to get any value for
given key.
I tested same example with tomcat and everything is working fine

Do i need to add anything extra in Jetty configuration?
I am using org.mortbay.jetty plugin for Maven


-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/