You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Nick Westgate (JIRA)" <de...@tapestry.apache.org> on 2007/09/04 09:32:58 UTC
[jira] Updated: (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 ]
Nick Westgate updated TAPESTRY-1642:
------------------------------------
Description:
The Label component assumes validation and label strings are to be the same.
This is sometimes not desired, however. E.g:
[ ] itemName1 (some note)
[ ] itemName2 (a different note)
...
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 played with several solutions to this problem I favour one which aids previewability:
The body is simply replaced by the contents of a body parameter.
<label t:type="label" for="itemCheck" t:body="${item.points} ${message:points}">
10 points
</label>
Cheers,
Nick.
was:
The component label scheme works well assuming validation and label strings are to be the same.
This is often not desired, however. E.g:
[ ] itemName1 (some note)
[ ] itemName2 (a different note)
...
Our use-case is points displayed as part of a todo item name:
[ ] 3 - ItemName1
[ ] 7 - ItemName2
...
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" t:value="item.done" t:label="item.name"/>
<label t:type="label" t:for="itemCheck">
<span class="points">${item.points}</span> - ${item.name}
</label>
</div>
Rather than another parameter, it would be nice if label could simply check for a body.
If present, render the body and disable the rendering of the standard label name.
Cheers,
Nick.
Summary: Label component needs the ability to optionally render a body. (was: Label component needs the ability to optionally render its body.)
> 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
> Priority: Minor
>
> The Label component assumes validation and label strings are to be the same.
> This is sometimes not desired, however. E.g:
> [ ] itemName1 (some note)
> [ ] itemName2 (a different note)
> ...
> 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 played with several solutions to this problem I favour one which aids previewability:
> The body is simply replaced by the contents of a body parameter.
> <label t:type="label" for="itemCheck" t:body="${item.points} ${message:points}">
> 10 points
> </label>
> 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