You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Chris Poulsen (JIRA)" <ji...@apache.org> on 2016/12/06 11:40:58 UTC

[jira] [Updated] (TAP5-2566) RenderInformals mixin does not work with inherited informal parameters

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

Chris Poulsen updated TAP5-2566:
--------------------------------
    Summary: RenderInformals mixin does not work with inherited informal parameters  (was: RenderInformals mixin does not work with interited informal parameters)

> RenderInformals mixin does not work with inherited informal parameters
> ----------------------------------------------------------------------
>
>                 Key: TAP5-2566
>                 URL: https://issues.apache.org/jira/browse/TAP5-2566
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4.1
>            Reporter: Chris Poulsen
>
> It seems like the informal parameters are not propagated to the mixin, if they are inherited. Explicitly rendering the informals instead works.
> The following example illustrates the issue:
> {code:title=Page.tml}
> ...
> <t1 inheritedInformal="inheritedInformal"/>
> ...
> {code}
> {code:title=T1.java}
> @SupportsInformalParameters
> public class T1
> {
>     @Component( inheritInformalParameters = true )
>     private T2 t2;
> }
> {code}
> {code:title=T1.tml}
> <div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd">
> <t:content>
>     <span t1="t1">
>         <span t:id="t2"/>
>     </span>
> </t:content>
> </div>
> {code}
> {code:title=T2.java}
> public class T2
> {
>     @Mixin
>     private RenderInformals renderInformals;  // Does not work like expected
>     @BeginRender
>     void begin( MarkupWriter writer )
>     {
>         writer.element( "span", "t2", "t2" );
>         // resources.renderInformalParameters( writer ); // Works like expected
>     }
>     @AfterRender
>     void after( MarkupWriter writer )
>     {
>         writer.end();
>     }
>     @Inject
>     private ComponentResources resources;
> }
> {code}
> The expected output should be:
> {code}
> <span t1="t1">
>   <span inheritedinformal="inheritedInformal" t2="t2"></span>
> </span>
> {code}
> But the produced output is:
> {code}
> <span t1="t1">
>   <span t2="t2"></span>
> </span>
> {code}
> The problem have arisen because we wrap the tapestry Radio component (which uses the RenderInformals mixin) 
> A workaround could be to use the RenderNotification plugin and explicitly render the informals in the parent component (T1 in the sample) - but that is not really a nice "solution" (or expected behavior)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)