Re: [S2] Recipe for Action and View

2008-07-14 Thread Gabriel Belingueres
t;> things, >>> but I would consider it as bad style. >>> >>> Greetings, >>> ~Andreas >>> >>> >>> [1] http://article.gmane.org/gmane.comp.jakarta.struts.user/158395 >>> >>> >>> -------------

Re: [S2] Recipe for Action and View

2008-07-13 Thread ravi_eze
http://article.gmane.org/gmane.comp.jakarta.struts.user/158395 >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > >

Re: [S2] Recipe for Action and View

2008-07-12 Thread Andreas Mähler
Hi ! Gabriel Belingueres schrieb: The problem you want to solve is very common (skipping form validation the first time you call an action) Aah - I thought so - that's why I was asking for a recipe. and, as Dave wrote, it is commonly solved by invoking the action with the input() method [1].

Re: [S2] Recipe for Action and View

2008-07-12 Thread Dave Newton
--- On Sat, 7/12/08, Andreas Mähler wrote: > Are there any interceptors that actually change the parameter map? > As I said, I am a S2 newbie and haven't heard of many things, but I > would consider it as bad style. As an example, the checkbox interceptor removes the hidden checkbox parameters

Re: [S2] Recipe for Action and View

2008-07-12 Thread Gabriel Belingueres
Sorry it seems I entered the conversation later and didn't saw that email. The problem you want to solve is very common (skipping form validation the first time you call an action) and, as Dave wrote, it is commonly solved by invoking the action with the input() method [1]. This method will do not

Re: [S2] Recipe for Action and View

2008-07-12 Thread Andreas Mähler
Hello again, Gabriel Belingueres schrieb: Without knowing what are you actually trying to accomplish with this interceptor, I would warn that when an interceptor messes up with the parameters, you need to carefully think where in the interceptor chain this interceptor will execute. I explain w

Re: [S2] Recipe for Action and View

2008-07-12 Thread Gabriel Belingueres
Without knowing what are you actually trying to accomplish with this interceptor, I would warn that when an interceptor messes up with the parameters, you need to carefully think where in the interceptor chain this interceptor will execute. 2008/7/11 Andreas Mähler <[EMAIL PROTECTED]>: > Hello Gab

Re: [S2] Recipe for Action and View

2008-07-11 Thread Dave Newton
Personally I'd either map an action to the input method or differentiate based on GET/POST requests, but that's just personal preference. Dave --- On Fri, 7/11/08, Andreas Mähler <[EMAIL PROTECTED]> wrote: > From: Andreas Mähler <[EMAIL PROTECTED]> > Subject: Re

Re: [S2] Recipe for Action and View

2008-07-11 Thread Andreas Mähler
Hello Gabriel, yes, I indeed took that into consideration, but if i am not wrong, there are two drawbacks: 1: When I create my own base class, and would like to use the prepare-method for something else, too, I need to overwrite the old method and mustn't forget to call super.prepare() in my

Re: [S2] Recipe for Action and View

2008-07-11 Thread Gabriel Belingueres
You can also opt for sharing the prepare() code through inheritance, meaning that you create a superclass action holding the prepare() code, instead of coding a custom interceptor. 2008/7/11 Andreas Mähler <[EMAIL PROTECTED]>: > Thanks for your Answer, Lukasz. > > I already know the PrepareInterce

Re: [S2] Recipe for Action and View

2008-07-11 Thread Andreas Mähler
Thanks for your Answer, Lukasz. I already know the PrepareInterceptor and it can be used for what I would like to do. But I consider a special interceptor more convinient, since I intend to use it for more than one pair of view and action. (Using PrepareInterceptor would imply the need to add

Re: [S2] Recipe for Action and View

2008-07-10 Thread Lukasz Lenart
Hi, Check PrepareInterceptor [1] with prepare() method [1] http://struts.apache.org/2.1.2/docs/prepare-interceptor.html Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

[S2] Recipe for Action and View

2008-07-10 Thread Andreas Mähler
Hello everyone, this is my first S2 project - i am a newbie (although i have a tiny little experience with S1...). :-) I am storing my view (JSP) files in /WEB-INF/jsp/... so they cannot be accessed directly to prevent links from external pages that contain fake parameters. Therefore all request