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)" <de...@tapestry.apache.org> on 2008/01/24 19:01:08 UTC

[jira] Assigned: (TAPESTRY-1642) Label component needs the ability to optionally render a body.

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

Howard M. Lewis Ship reassigned TAPESTRY-1642:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> Label component needs the ability to optionally render a body.
> --------------------------------------------------------------
>
>                 Key: TAPESTRY-1642
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1642
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0.5
>            Reporter: Nick Westgate
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>
> The Label component assumes validation and label strings are to be the same.
> This is sometimes not desired, however.
> Our use-case is points displayed as part of a todo item name:
> [ ] 3 points
> [ ] 7 points
> ...
> Using code something like this:
> <div t:type="loop" t:source="itemList" t:value="item" t:volatile="true">
>     <input t:type="checkbox" t:id="itemCheck" id="itemCheck" t:value="item.done" t:label="item.name"/>
>     <label t:type="label" for="itemCheck">
>         <span class="points">${item.points} ${message:points}</span>
>     </label>
> </div>
> Having explored several solutions to this problem (auto body render, body render/discard/replace parameters, mixins, body 
> blocks), I prefer one which aids previewability.
> A renderBody parameter allows the body to render, assisted by the improved Any component - see TAPESTRY-1733.
>     <label t:type="label" for="itemCheck" t:renderBody="true">
>         <span t:type="Any" t:body="${item.points} ${message:points}" class="points">10 points</span>
>     </label>
> (Note: this doesn't work in 5.0.5 because of the invariant expansions bug which is fixed in SVN.)
> Cheers,
> Nick.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org