You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Michael Hartman <mp...@mchsi.com> on 2002/09/06 00:33:46 UTC

Re: [PATCH] Struts NodeTag URI attribute fails to get updated

Re-post because of lack of response.  Am I off-base on this?  Is there
someone I should send this to directly?

----- Original Message -----
From: <mp...@mchsi.com>
To: <sl...@jakarta.apache.org>
Sent: Tuesday, August 27, 2002 2:47 PM
Subject: [PATCH] Struts NodeTag URI attribute fails to get updated


> In doStartTag, if the uri attribute isn't set it
> defaults to using the uriName and uriProperty to
> retrieve a value from the bean referenced by uriName.
> The uri variable is then set to that value.
> Consequently, with the next tag invocation, the if
> statement is not satisfied and the previous uri is
> used.  However, the bean referenced by uriName may very
> well have an updated uri value.
>
> One solution (as illustrated in the attached patch) is
> to call the NodeTagSupport's init method in doEndTag
> that will effectively reset the object's internal state
> for the next invocation.
>
> Affects Slide nightly build 08-27-2002
>


----------------------------------------------------------------------------
----


> Index: NodeTagSupport.java
> ===================================================================
> RCS file:
/home/cvspublic/jakarta-slide/src/taglib/common/org/apache/slide/taglib/tag/
NodeTagSupport.java,v
> retrieving revision 1.5
> diff -u -w -r1.5 NodeTagSupport.java
> --- NodeTagSupport.java 1 Aug 2002 15:43:53 -0000 1.5
> +++ NodeTagSupport.java 27 Aug 2002 19:38:05 -0000
> @@ -162,6 +162,9 @@
>              pageContext.removeAttribute(attrName);
>          }
>
> +        // reset state for next tag invocation
> +        init();
> +
>          return EVAL_PAGE;
>      }
>
>
>


----------------------------------------------------------------------------
----


> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [PATCH] Struts NodeTag URI attribute fails to get updated

Posted by Christopher Lenz <cm...@gmx.de>.
Hi Michael,

sorry for being unresponsive on this :P

I've committed a change where the init() method is called from the 
doEndTag() method... I think that should work too, and I'd consider it a 
somewhat cleaner solution, but I'm not 100% sure. Can you check it out?

Michael Hartman wrote:
> Re-post because of lack of response.  Am I off-base on this?  Is there
> someone I should send this to directly?
> 
> ----- Original Message -----
> From: <mp...@mchsi.com>
> To: <sl...@jakarta.apache.org>
> Sent: Tuesday, August 27, 2002 2:47 PM
> Subject: [PATCH] Struts NodeTag URI attribute fails to get updated
> 
> 
> 
>>In doStartTag, if the uri attribute isn't set it
>>defaults to using the uriName and uriProperty to
>>retrieve a value from the bean referenced by uriName.
>>The uri variable is then set to that value.
>>Consequently, with the next tag invocation, the if
>>statement is not satisfied and the previous uri is
>>used.  However, the bean referenced by uriName may very
>>well have an updated uri value.
>>
>>One solution (as illustrated in the attached patch) is
>>to call the NodeTagSupport's init method in doEndTag
>>that will effectively reset the object's internal state
>>for the next invocation.
>>
>>Affects Slide nightly build 08-27-2002

[...]

-- 
Christopher Lenz
/=/ cmlenz at gmx.de


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>