struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pontarelli <br...@pontarelli.com>
Subject Re: invent way to get dropdown data in JSP not using actions or taglibs?
Date Wed, 02 Jan 2008 22:35:56 GMT

Dave Newton wrote:
> --- Brian Pontarelli <brian@pontarelli.com> wrote:
>   
>> - The preparation logic should ONLY be called when the form is rendered. 
>> If I'm remembering correctly, any action that implements Preparable is 
>> called via the interceptor chain during all submissions, including a 
>> valid form submission where the form doesn't need to be prepared again. 
>> The solution should be capable of understanding that the form is being 
>> rendered.
>>     
>
> Preparable is a MethodFilterInterceptor.
>   
True, but this doesn't help the fact that Prepare is invoked on valid 
form submissions. What it really needs to do is understand errors. Also, 
the Prepare is invoked prior to the action invocation. Form preparation 
is really necessary only after the action has been invoked and prior to 
the result being rendered.


>> 2. Add a <s:prepare> tag that somehow calls the preparation code.
>>     
>
> Ewewewew!
>   
Yeah, not a fan either. :)

>> 3. Make the prepare interceptor more intelligent to understand when 
>> forms are being rendered (is this possible without major headaches?)
>>     
>
> GET v. POST is the easiest (maybe); that's what I did on a couple of projects
> (more or less).
>   
Agreed.

-bp

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message