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/06/25 14:21:25 UTC

[jira] Created: (TAPESTRY-1597) When a List is converted to a SelectModel, the keys are converted unnecessarily to strings

When a List is converted to a SelectModel, the keys are converted unnecessarily to strings
------------------------------------------------------------------------------------------

                 Key: TAPESTRY-1597
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1597
             Project: Tapestry
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.0
            Reporter: Nick Westgate


Same thing as the Map problem, but a one liner:

org.apache.tapestry.internal.TapestryInternalUtils, line 234:

    public static OptionModel toOptionModel(Object input)
    {
        String value = (input != null ? String.valueOf(input) : "");

        return new OptionModelImpl(value, false, value); // <-- should be value, false, input (and perhaps rename value to label for consistency)
    }

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-1597) When a List is converted to a SelectModel, the keys are converted unnecessarily to strings

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

Nick Westgate updated TAPESTRY-1597:
------------------------------------

    Attachment: TAPESTRY-1597.patch

Attached patch that fixes the problem and updates 2 affected tests.
(The changes are similar to those made for similar Map bugfix.)

Cheers,
Nick.

> When a List is converted to a SelectModel, the keys are converted unnecessarily to strings
> ------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1597
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1597
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0
>            Reporter: Nick Westgate
>         Attachments: TAPESTRY-1597.patch
>
>
> Same thing as the Map problem, but a one liner:
> org.apache.tapestry.internal.TapestryInternalUtils, line 234:
>     public static OptionModel toOptionModel(Object input)
>     {
>         String value = (input != null ? String.valueOf(input) : "");
>         return new OptionModelImpl(value, false, value); // <-- should be value, false, input (and perhaps rename value to label for consistency)
>     }
> 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-1597) When a List is converted to a SelectModel, the keys are converted unnecessarily to strings

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

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

       Resolution: Fixed
    Fix Version/s: 5.0.6
         Assignee: Howard M. Lewis Ship

Thanks for the patch!

> When a List is converted to a SelectModel, the keys are converted unnecessarily to strings
> ------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1597
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1597
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0
>            Reporter: Nick Westgate
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.6
>
>         Attachments: TAPESTRY-1597.patch
>
>
> Same thing as the Map problem, but a one liner:
> org.apache.tapestry.internal.TapestryInternalUtils, line 234:
>     public static OptionModel toOptionModel(Object input)
>     {
>         String value = (input != null ? String.valueOf(input) : "");
>         return new OptionModelImpl(value, false, value); // <-- should be value, false, input (and perhaps rename value to label for consistency)
>     }
> 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