Re: Annotation Support for bypassing prepare

2013-08-07 Thread Paul Benedict
I wonder if perhaps there should be a Preparable2 interface that passes in the name of the method that will execute. That might be more advanced than the annotation. OTOH, @SkipPreparable could take an array of method names. Which is more functional? On Sat, Aug 3, 2013 at 3:10 PM, Sreekanth S.

Re: Annotation Support for bypassing prepare

2013-08-07 Thread Sreekanth S. Nair
With all gratitude, I strongly disagree with that idea . That bring more clumsiness to big strust2 applications. And the idea of taking an array of Prepare is a good idea but don't you think it consumes a pinch of runtime performance.

Re: Annotation Support for bypassing prepare

2013-08-07 Thread Paul Benedict
Not an array of prepares, but an array of strings for which execute methods the Preaparable callback should be excluded. On Aug 7, 2013 11:09 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: With all gratitude, I strongly disagree with that idea . That bring more clumsiness to big

Re: Annotation Support for bypassing prepare

2013-08-07 Thread Sreekanth S. Nair
Guess same performance concern is applicable for that as well. Any ideas of making it simpler for existing app without much coding, performance and clumsiness could be better. And i think @SkipPreapre at method level gives more visibility than at class level

Re: Annotation Support for bypassing prepare

2013-08-07 Thread Paul Benedict
I don't see a performance concern here. Checking a few strings isn't going to slow down anything. On Aug 8, 2013 12:06 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Guess same performance concern is applicable for that as well. Any ideas of making it simpler for existing app

Re: Annotation Support for bypassing prepare

2013-08-07 Thread Sreekanth S. Nair
I admit it, thats why i mentioned it as a pinch of performance :) . -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Thu, Aug 8, 2013 at 10:57 AM, Paul Benedict

Re: Annotation Support for bypassing prepare

2013-08-03 Thread Sreekanth S. Nair
Attaching SkippablePrepareInterceptor and SkipPrepare Annotation Code, I hope it may helpful for other who have similar requirement. Struts2 can include it, if strust2 developer think its worthy. -- Thanks Regards Srikanth On Sat, Jul 27, 2013 at 12:00 AM, Sreekanth S. Nair

Annotation Support for bypassing prepare

2013-07-26 Thread Sreekanth S. Nair
Is there any annotation available to bypass prepare method while invoking certain methods, just like @skipvalidation -- Thanks Regards Srikanth

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Paul Benedict
Why would you want to bypass it? On Jul 26, 2013 3:47 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Is there any annotation available to bypass prepare method while invoking certain methods, just like @skipvalidation -- Thanks Regards Srikanth

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Sreekanth S. Nair
Suppose i need to call any ajax validation on the same Action, it unnecessarily run in to prepare. Where that ajax validation doesn't required to call prepare. -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob :

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Paul Benedict
Have you thought of removing the implements Preparable from your action? That will do it. On Jul 26, 2013 6:12 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Suppose i need to call any ajax validation on the same Action, it unnecessarily run in to prepare. Where that ajax

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Sreekanth S. Nair
No i can't do that, because that Action contains other method which needs Prepare, the only option i can think of is moving these Ajax method to some other Action which is not extending Prepareable. But as of now its very hard because so many resources i have to change. Any other idea? -- Thanks

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Dave Newton
Did you try `prepareWhateverMethodThatNeedsPrepare`? I don't recall if that works or not. On Fri, Jul 26, 2013 at 7:24 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: No i can't do that, because that Action contains other method which needs Prepare, the only option i can think

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Sreekanth S. Nair
Too many methods :( needs its own prepare then. -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Fri, Jul 26, 2013 at 6:37 PM, Dave Newton davelnew...@gmail.com

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Dave Newton
If you'll note in the docs the interceptor extends MethodFilterInterceptor, so one trivial way to fix it is to configure the interceptor for the specific actions. Another option is to take the existing interceptor and extend it to support something like annotations, a naming convention, etc. to

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Sreekanth S. Nair
The idea is precisely good, thats what i wanted but do you think it will be a good addition to strust2 framework by any chance then i hope the same could be a part of struts2 framework itself. -- Thanks Regards Srikanth Software Developer eGovernments

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Dave Newton
Technically it already *is* part of S2 in the MethodFilterInterceptor class. I'm not particularly excited about an annotation to skip Prepareable, but I'm not fundamentally opposed, either. Dave On Fri, Jul 26, 2013 at 2:07 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: The

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Sreekanth S. Nair
Okay, i can create one for mine, leaving to struts2 framework developer whether strust2 need an annotation like @SkipPrepare. Thanks for your support Dave. -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob :

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Chris Pratt
Why not just take your action and move the Preparable interface and prepare() function to a subclass with the methods that require it's support? Seems a lot easier than creating more infrastructure. (*Chris*) On Fri, Jul 26, 2013 at 11:22 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Sreekanth S. Nair
Hi Chris, i already answered for the same, we have more than 50 modules and 1000 of Action classes. Doing what you say is not an easy task for us instead of adding a simple annotation on those method. -- Thanks Regards Srikanth Software Developer eGovernments