Really?  Why not write a filter that invokes "beforePagerRendered()" before invoking "chain.doFilter()", then invoking "afterPageRendered()" after invoking "chain.doFilter()"?
 
It seems to me that filters do *exactly* then thing that you claim they do not.  Could you please elaborate why you believe filters wouldn't implement these behaviours?
 
-dan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Taylor Cowan
Sent: Monday, June 11, 2001 8:04 PM
To: [EMAIL PROTECTED]
Subject: Re: Proposal

I think this is a very good proposal.  I would not use the action identifiers.  They should just be methods of the listener interface:
 
public void beforePagerRendered(...)
public void afterPageRendered(...)
 
This seems to be similar to filters, but 2.3 filters don't solve this problem for a struts app. 
 
Taylor
 
----- Original Message -----
From: Jeff Trent
Sent: Wednesday, June 06, 2001 10:21 AM
Subject: Proposal

New here ... so bare with me.
 
I'd like to propose the following enhancement to ActionForm:
 
    public void addListener(ActionFormListener);
    public void removeListener(ActionFormListener);
 
 Here is the basics of ActionFormListener I'm interested in to start out with:
 
    public abstract class ActionFormListener
    {
        public static final int ACTION_TYPE_PAGE_PRE_RENDERED = 1;
        public static final int ACTION_TYPE_PAGE_POST_RENDERED = 2;
 
        public abstract void actionFormNotify(int actionType, String context /* reserved for future use*/);
    }
 
 
---
 
These messages would be sent before and after the RequestDispatcher included or forwarded to the JSP page.
 
The primary reason I'm propsing this feature is to allocate / free (respectfully) scarce resources that I would like to be made available on the page that I do not want to serialize to transient members of my form.
 
thank you,
jeffrey trent
 

Reply via email to