Re: Rest + JSON

2014-02-26 Thread Lukasz Lenart
The simplest way is to prepare a patch or Pull Request via GitHub - then I can easily review your proposal 2014-02-26 17:17 GMT+01:00 Felipe Lorenz : > Hello Lukasz, > > There is any impact if we add the following code in the JsonLibHandler > class: > > JsonConfig jsonConfig = new JsonConfig(); >

Re: Rest + JSON

2014-02-26 Thread Felipe Lorenz
Hello Lukasz, There is any impact if we add the following code in the JsonLibHandler class: JsonConfig jsonConfig = new JsonConfig(); jsonConfig.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT); Just right above the line: if (target != null && sb.length() > 0 && sb.charAt(0) == '[')

Re: Validation with DefaultActionValidatorManager throws NullPointerExeption

2014-02-26 Thread Lukasz Lenart
2014-02-26 16:59 GMT+01:00 Thomas Hermann : > Do you simply mean: > > - > DefaultActionValidatorManager validator = new > DefaultActionValidatorManager(); > validator.setFileManagerFactory(new DefaultFileManagerFactory()); > validator.validate(request

Re: Validation with DefaultActionValidatorManager throws NullPointerExeption

2014-02-26 Thread Thomas Hermann
Am 26.02.2014 13:48, schrieb Lukasz Lenart: 2014-02-26 13:35 GMT+01:00 Thomas Hermann : Hello, In a JUnit-Test and in a Ajax-Server I try to validate an Object with com.opensymphony.xwork2.validator.DefaultActionValidatorManager (Version 2.3.15.3). The MyObject-validation.xml file is provided

Re: Struts 2 defining a base action

2014-02-26 Thread Christoph Nenning
Basically it is better to reuse code via interceptors, not action base classes. You can have a look at JSONValidationInterceptor for an example how an interceptor can create a result. In your case you could define an interface Exportable which actions have to implement and your interceptor can

Re: Rest + JSON

2014-02-26 Thread Lukasz Lenart
You can always share your work as a patch or a plugin ;-) 2014-02-26 14:00 GMT+01:00 Felipe Lorenz : > Thanks Lukasz, I think I´ll create a CustomContentTypeHandler. > > Em 26/02/2014 04:21, Lukasz Lenart escreveu: >> >> 2014-02-25 19:08 GMT+01:00 Felipe Lorenz : >>> >>> Hi, >>> >>> I was not clea

Re: Rest + JSON

2014-02-26 Thread Felipe Lorenz
Thanks Lukasz, I think I´ll create a CustomContentTypeHandler. Em 26/02/2014 04:21, Lukasz Lenart escreveu: 2014-02-25 19:08 GMT+01:00 Felipe Lorenz : Hi, I was not clear with my doubt. I dont´t want to use json-plugin, since rest-plugin already has a json solution. I wanna try to use 100%

Re: Validation with DefaultActionValidatorManager throws NullPointerExeption

2014-02-26 Thread Lukasz Lenart
2014-02-26 13:35 GMT+01:00 Thomas Hermann : > Hello, > > In a JUnit-Test and in a Ajax-Server I try to validate an Object with > com.opensymphony.xwork2.validator.DefaultActionValidatorManager (Version > 2.3.15.3). > > The MyObject-validation.xml file is provided in the same directory as the > MyOb

Validation with DefaultActionValidatorManager throws NullPointerExeption

2014-02-26 Thread Thomas Hermann
Hello, In a JUnit-Test and in a Ajax-Server I try to validate an Object with com.opensymphony.xwork2.validator.DefaultActionValidatorManager (Version 2.3.15.3). The MyObject-validation.xml file is provided in the same directory as the MyObject-Class (no action alias used). I instantiate th

Re: Rest + JSON

2014-02-26 Thread Rahul Tokase
Just a thought In struts2 json plugin we can have control using annotations. May be you can seek/find the same in rest plugin. On Wed, Feb 26, 2014 at 12:51 PM, Lukasz Lenart wrote: > 2014-02-25 19:08 GMT+01:00 Felipe Lorenz : > > Hi, > > > > I was not clear with my doubt. I dont´t want to use