You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Cagatay Civici (JIRA)" <de...@myfaces.apache.org> on 2006/11/03 19:11:18 UTC

[jira] Reopened: (TOMAHAWK-36) t:div, t:span, s:fieldset should render children

     [ http://issues.apache.org/jira/browse/TOMAHAWK-36?page=all ]

Cagatay Civici reopened TOMAHAWK-36:
------------------------------------

      Assignee: Cagatay Civici  (was: Martin Marinschek)
             
The patch fails in cases where the children of these component do not render their children. An example would be;

<s:fieldset>
		<t:aliasBeansScope>
			<t:aliasBean alias="#{aliasName}" value="#{SomeBean.someProperty}"></t:aliasBean>
			<h:outputText value="You cant see me" />
		</t:aliasBeansScope>
</s:fieldset>

If these components are going to render their children, they should do it in panelGrid or panelGroup style using RendererUtils.

> t:div, t:span, s:fieldset should render children
> ------------------------------------------------
>
>                 Key: TOMAHAWK-36
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-36
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>         Environment: tomcat 5.5.9 
>            Reporter: Dennis Byrne
>         Assigned To: Cagatay Civici
>            Priority: Minor
>             Fix For: 1.1.4-SNAPSHOT
>
>         Attachments: fieldset.diff, TOMAHAWK-36.patch
>
>
> In the following JSP, the test method of the test bean creates a HtmlOutputText, sets a unique id, sets a value, and adds it to the children collection of the UIComponent of the div tag.  However the new child component is never rendered.  The only child rendered is the first one (w/ @value = "foo" ).
> <f:view>
>    <h:commandLink value="action" action="#{test.test}" />
>    <t:div binding="#{test.tag}">
>              <h:outputText value="foo" />
>    </t:div>
> </f:view>
> The reason why the first child (@value=foo) is always rendered has to do w/ the fact that UIComponentTag.doEndTag ends up triggerring HtmlTextRendererBase.renderOutputText during the render response phase.  This also explains why the programmatically added sibling is not rendered - there is no UIComponentTag.doEndTag() .
> The programmatically added UIComponent will be rendered if you wrap t:div w/ a panelGrid or panelGroup.  This is because the UIComponents for these two tags render their own children, and MyFaces uses recursion in order to make sure the proper encoding methods are called on *all* children.   

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira