DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31804>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31804


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |




------- Additional Comments From [EMAIL PROTECTED]  2006-08-29 23:24 -------
This isn't working correctly.  However I think the examples given so far have 
been incomplete.  I will try 
to give a full example.

Lets suppose we have two traditional custom tags, for this example I'm going to 
use the Spring 2.0 
form tag libraries as they are the ones that led me here.

The first tag is form:form tag, which sets up context to be accessed by nested 
tags via the setParent 
mechanism.

The second tag is form:label tag, which makes use of the context created by the 
form:form tag and only 
functions properly when nested within a form:form tag.

So we might have an example jsp as follows.

<form:form> 
  <form:label>hello</form:label>
</form:form>

the generated java file for this jsp would invoke setParent(null) on the 
form:form tag and would invoke 
setParent([reference to the form tag]) on the label tag.  This would be correct.

Now let us assume that we create a tag file which makes use of the form:label 
tag because we tired of 
typing "Hello" everywhere.

Our tag file might look like this.

<form:label>Hello</form:label>

and our revised jsp page would look like this.

<form:form>
  <mycustumtag/>
</form:form>

In this case the form:form tag would again get a setParent invoked with null, 
(still correct) and 
mycustomtag would get it's setParent invoked with the reference to the 
form:form tag, (also still 
correct), but the form:label tag inside of mycustomtag would get it's setParent 
method invoked with 
"null".  This is "Not Correct".  The label tag is nested inside of an outer tag 
and should have it's 
setParent method invoked with the reference to that outer tag.

Here is the logic I would propose for this section of code.

if (myParent == null) {
  // set parent of any top level tags used in tag file to null
} else {
  // set parent of any top level tags used in tag file to "this"
}


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to