You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/10/20 18:26:41 UTC

DO NOT REPLY [Bug 31804] New: - setParent() is not called on nested tags in a tag file (.tagx)

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

setParent() is not called on nested tags in a tag file (.tagx)

           Summary: setParent() is not called on nested tags in a tag file
                    (.tagx)
           Product: Tomcat 5
           Version: 5.0.28
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: vspa@mail.ru


Hi, everybody.

Suppose I have a tag file (.tagx to be precise). I have some custom tags of mine 
included in that tag file. If I override setParent() in such a custom tag, then 
I see, that it's invoked with "null" parameter. Custom tag is a "Classic" tag 
(extends TagSupport).

Simplified example: This tag file is called "submit.tagx"

<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:custom="http://my.com/
tags-html" version="2.0" >

    <jsp:directive.tag body-content="empty"/>
    <jsp:directive.attribute name="action" required="true" rtexprvalue="true"/>
    <jsp:directive.attribute name="label" required="true" rtexprvalue="true"/>

    <custom:submit action="${action}" label="${label}" name="submitButton" />

</jsp:root>

In debug output from setParent(Tag) of custom:submit I see, that it's called 
with "null" value.

If, instead of custom:submit, I put there another custom tag, which follows 
SimpleTagSupport model, then setParent(JspTag) is not called at all!!!

I would expect a reference to something, representing translated class of Tag 
File (submit.tagx) is passed.

As the result, tag nesting tree is broken. 

I need to access Struts html:form tag, which is the embracing tag from my inner 
<custom:submit> tag to obtain form name, but this is not possible.

<nested:form action="/Action">
   <ctrl:submit action="save" label="Save"/>
</nested:form>

(where ctrl:submit is submit.tagx)

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