You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2009/04/03 02:27:13 UTC

[jira] Commented: (TAP5-433) conditional parameters to components

    [ https://issues.apache.org/jira/browse/TAP5-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695188#action_12695188 ] 

Howard M. Lewis Ship commented on TAP5-433:
-------------------------------------------

That is, refactor <t:tab> to be a <t:tabview> component with nested <t:tab> elements rather than the current approach shown in the example.

> 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.