--- Weitergeleitete Nachricht / Forwarded Message ---
Date: Wed, 21 Nov 2001 16:28:08 +0100 (MET)
From: Stefan Wachter <[EMAIL PROTECTED]>
To: Oleg V Alexeev <[EMAIL PROTECTED]>
Subject: Re: Extensibility of struts

Hi Oleg,
 
our first proposal concerning the extensibility of struts concerns the
html-taglib. Currently in the org.apache.struts.taglib.BaseHandlerTag the
members
(onClick, onDblClick, ...) are directly accessed. If the prepare methods
would use getter methods then you could easily extend the tags by
overloading the
getter method:

Current version of BaseHandler has methods like this:

    private void prepareKeyEvents(StringBuffer handlers) {

        if (onKeyDown != null) {
            handlers.append(" onKeyDown=\"");
            handlers.append(onKeyDown);
            handlers.append("\"");
        }

        if (onKeyUp != null) {
            handlers.append(" onKeyUp=\"");
            handlers.append(onKeyUp);
            handlers.append("\"");
        }

        if (onKeyPress != null) {
            handlers.append(" onKeyPress=\"");
            handlers.append(onKeyPress);
            handlers.append("\"");
        }
    }

Our proposed version is:

    private void prepareKeyEvents(StringBuffer handlers) {

        if (getOnKeyDown() != null) {
            handlers.append(" onKeyDown=\"");
            handlers.append(getOnKeyDown());
            handlers.append("\"");
        }

        if (getOnKeyUp() != null) {
            handlers.append(" onKeyUp=\"");
            handlers.append(getOnKeyUp());
            handlers.append("\"");
        }

        if (getOnKeyPress() != null) {
            handlers.append(" onKeyPress=\"");
            handlers.append(getOnKeyPress());
            handlers.append("\"");
       }
    }

Admittedly this is not a great change, but it would help extensibility a
lot. Who decides if this proposal is incorporated into the next version?

I will send you some more proposals soon.

Ciao,
--Stefan


> > Hello Stefan,
> > 
> > I am ready to discuss struts extension ways. This year I put
> > contribution to the struts project - ServiceManager. This contrib is a
> > attempt to make struts extensible with some kind of plugins. Now I
> > work under next version. It is interesting for me.
> > 
> > Wednesday, November 14, 2001, 11:02:48 AM, you wrote:
> > 
> > SW> Hi,
> > 
> > SW> I am working in a (big) banking project where struts is used. We had
> > to
> > SW> extend struts at several spots in order to meet the requirements.
> > Extending the
> > SW> framework we recognized that the current version of struts is not
> > designed for
> > SW> extension! Yet, I think that a framework must be easily extensible
> > because
> > SW> the developers of a framework can not foresee all possible needs
> (let
> > alone
> > SW> solutions).
> > 
> > SW> We had to copy and patch a lot of source code of struts to implement
> > the
> > SW> required extensions. While doing this we recognized several spots
> (in
> > framework
> > SW> terminology called hot spots) where hook methods would introduce
> great
> > SW> possibilities for extensions.
> > 
> > SW> In particular, we had to patch the struts-html taglib, in order to
> > generate
> > SW> additional html output (e.g. hidden fields, javascript) that should
> be
> > SW> transparent to the JSP developer. 
> > 
> > SW> Furthermore we patched the struts servlet in order to allow
> > asynchronous
> > SW> request processing. Asynchronous request processing means that a
> user
> > is served
> > SW> "please wait pages" until the original request is processed.
> > 
> > SW> I would like to contact the developers that are commiters of the
> > struts-html
> > SW> taglib and of the ActionServlet / Action classes in order to discuss
> > our
> > SW> ideas of extensibility.
> > 
> > SW> Ciao,
> > SW> --Stefan
> > 
> > 
> > 
> > 
> > -- 
> > Best regards,
> >  Oleg                            mailto:[EMAIL PROTECTED]
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> -- 
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
> 
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to