[ 
https://issues.apache.org/jira/browse/TOBAGO-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bernd Bohmann resolved TOBAGO-1982.
-----------------------------------
    Resolution: Fixed

> Composite components in segment layout not rendered correctly
> -------------------------------------------------------------
>
>                 Key: TOBAGO-1982
>                 URL: https://issues.apache.org/jira/browse/TOBAGO-1982
>             Project: MyFaces Tobago
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 4.3.2
>            Reporter: Henning Nöth
>            Assignee: Bernd Bohmann
>            Priority: Minor
>             Fix For: 5.11.0, 6.3.0
>
>
> Imagine a composite component for a text, where the attribute "asText" decide 
> if a tc:in or a tc:out is used.
> {code:xml}
> <cc:interface>
>   <cc:attribute name="value"/>
>   <cc:attribute name="asText" default="false"/>
> </cc:interface>
> <cc:implementation>
>   <tc:in id="in" value="#{cc.attrs.value}" rendered="#{!cc.attrs.asText}"/>
>   <tc:out id="out" value="#{cc.attrs.value}" rendered="#{cc.attrs.asText}"/>
> </cc:implementation>{code}
> Without a layout manager the component show either the tc:in or the tc:out as 
> expected.
>  Within a segment layout the component use two segments. One for the tc:in 
> and the second for the tc:out.
> If "asText=true" the first segment is empty and the second segment shows the 
> tc:out.
> If "asText=false" the first segment shows the tc:in and the second segment is 
> empty.
> This might be not the expected behavior, which I think is that the composite 
> component uses only one segment.
> As a workaround you can wrap the tc:in/tc:out with a panel:
> {code:xml}
> <cc:implementation>
>   <tc:panel id="wrapper">
>     <tc:in id="in" value="#{cc.attrs.value}" rendered="#{!cc.attrs.asText}"/>
>     <tc:out id="out" value="#{cc.attrs.value}" rendered="#{cc.attrs.asText}"/>
>   </tc:panel>
> </cc:implementation>{code}
>  
> (!) And the 'rendered' attribute on the composite component container doesn't 
> work within a segment layout which should be definitely fixed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to