[
https://issues.apache.org/jira/browse/TAP5-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Howard M. Lewis Ship closed TAP5-433.
-------------------------------------
Resolution: Won't Fix
Assignee: Howard M. Lewis Ship
Not interested in creating special-case extensions to the templating language
such as this. This is a case where the tab component should have an if
parameter and can simply choose not to render itself.
> conditional parameters to components
> ------------------------------------
>
> Key: TAP5-433
> URL: https://issues.apache.org/jira/browse/TAP5-433
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Affects Versions: 5.0.18
> Reporter: Joachim Van der Auwera
> Assignee: Howard M. Lewis Ship
>
> It would be interesting if you could remove parameters from components on
> request.
> For example, when rendering the tab component
> <t:tab>
> <t:parameter name="title1">First Tab Title</t:parameter>
> <t:parameter name="content1">First Tab Contents</t:parameter>
> <t:parameter name="title2">Second Tab Title</t:parameter>
> <t:parameter name="content2">Second Tab Contents</t:parameter>
> </t:tab>
> If you want to filter the tabs which can be displayed based on who is logged
> in, you would want to remove some of the parameter blocks. If you insert
> "t:if" tags for this, the parameters are attached to the "if" component, not
> the tab component.
> An alternative could be to make the parameter conditional :
> <t:tab>
> <t:parameter name="title1" if="tab1allowed">First Tab Title</t:parameter>
> <t:parameter name="content1" if="tab1allowed">First Tab
> Contents</t:parameter>
> <t:parameter name="title2" if="tab2allowed">Second Tab Title</t:parameter>
> <t:parameter name="content2" if="tab2allowed">Second Tab
> Contents</t:parameter>
> </t:tab>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.