You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Gagnon <ga...@yahoo.com> on 2003/09/24 17:23:37 UTC

Question regarding Tags and the release() method

Hi all,

  It's probably not a bug, but I can't figure it out. 
I wrote a Tag that inherit from BaseHandlerTag.  The
onclick (per example) property of the BaseHandlerTag
is only reseted in the BaseHandlerTag release()
method.

  The problem is that the release method is called
only when the container wants to release a tag.  In
Tomcat that will happen if the TagPool is already
full.  The point is that release() is not called
between usage.  That means the onclick property is
never reseted between usage?!  

  In my tag I need to add something to the onclick
property .. so it get bigger at each call. For the
sake of clarity :-) Here is a part of my code.

...
   String origOnClick = this.getOnclick();
        if (origOnClick == null) {
            origOnClick = "";
        }
...
this.setOnclick(origOnClick + ";" + jsCall +
"disableAllSubmitButton();this.form.submit();");



I found this on the net regarding the proper use of
the release() method
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001

It seem clear that in Tomcat it will stick to the
spec.  

I know, I can reset the BaseHandlerTag properties in
my Tag ... but for what I understand so far there is a
bug in the BaseHandlerTag.  The BaseHandlerTag should
reset is properties in the doStartTag() method.

Is anywone can point me where I'm wrong ... It seems
to big to be a bug ... 

Thanks for your help
/David






__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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