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/07/13 12:30:04 UTC

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

Label component needs the ability to optionally render its 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 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.

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


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

Posted by "Nick Westgate (JIRA)" <de...@tapestry.apache.org>.
     [ 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


[jira] Updated: (TAPESTRY-1642) When the Label component has a body, it should render that rather than using the field's label

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Summary: When the Label component has a body, it should render that rather than using the field's label  (was: Label component needs the ability to optionally render a body.)

> When the Label component has a body, it should render that rather than using the field's label
> ----------------------------------------------------------------------------------------------
>
>                 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


[jira] Commented: (TAPESTRY-1642) When the Label component has a body, it should render that rather than using the field's label

Posted by "Sven Homburg (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-1642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579979#action_12579979 ] 

Sven Homburg commented on TAPESTRY-1642:
----------------------------------------

i think that was not a good idea for the (html)-designer purpose.
let me know if im think wrong, but nearly every designer is working 
with WYSIWYG tools and insert the label text between the label tag.

it s realy hard to explain the designer:
"dont forget to remove your label value after you finish your work"

i think its more felxible, if we can parameterize this behavior.


> When the Label component has a body, it should render that rather than using the field's label
> ----------------------------------------------------------------------------------------------
>
>                 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
>             Fix For: 5.0.10
>
>
> 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


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

Posted by "Nick Westgate (JIRA)" <de...@tapestry.apache.org>.
     [ 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 explored several solutions to this problem (auto body render, body render/discard/replace parameters, mixins, body 
blocks), I prefer that 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>

Cheers,
Nick.

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


> 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 explored several solutions to this problem (auto body render, body render/discard/replace parameters, mixins, body 
> blocks), I prefer that 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>
> 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


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

Posted by "Nick Westgate (JIRA)" <de...@tapestry.apache.org>.
     [ 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 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>10</span> <span t:type="Any" t:body="${message:points}">points</span>
    </label>

I would prefer:
        <span t:type="Any" t:body="${item.points} ${message:points}" class="points">10 points</span>
But the body parameter is treated as a literal and cached - the expansions are not re-evaluated in the loop.

Cheers,
Nick.

  was:
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 explored several solutions to this problem (auto body render, body render/discard/replace parameters, mixins, body 
blocks), I prefer that 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>

Cheers,
Nick.


> 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 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>10</span> <span t:type="Any" t:body="${message:points}">points</span>
>     </label>
> I would prefer:
>         <span t:type="Any" t:body="${item.points} ${message:points}" class="points">10 points</span>
> But the body parameter is treated as a literal and cached - the expansions are not re-evaluated in the loop.
> 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


[jira] Closed: (TAPESTRY-1642) When the Label component has a body, it should render that rather than using the field's label

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1642.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.10

> When the Label component has a body, it should render that rather than using the field's label
> ----------------------------------------------------------------------------------------------
>
>                 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
>             Fix For: 5.0.10
>
>
> 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


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

Posted by "Nick Westgate (JIRA)" <de...@tapestry.apache.org>.
     [ 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.
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.

  was:
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 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>10</span> <span t:type="Any" t:body="${message:points}">points</span>
    </label>

I would prefer:
        <span t:type="Any" t:body="${item.points} ${message:points}" class="points">10 points</span>
But the body parameter is treated as a literal and cached - the expansions are not re-evaluated in the loop.

Cheers,
Nick.


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


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

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ 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