You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sean Sullivan (JIRA)" <ji...@apache.org> on 2007/08/15 03:13:30 UTC

[jira] Created: (WICKET-845) Label constructor

Label constructor
-----------------

                 Key: WICKET-845
                 URL: https://issues.apache.org/jira/browse/WICKET-845
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.3.0-beta2
            Reporter: Sean Sullivan


Currently, the Label class provides this constructor:

          public Label(final String id, String label)

Can be changed to:

          public Label(final String id, CharSequence label)

Thanks!


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


[jira] Updated: (WICKET-845) Label constructor

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Quenot updated WICKET-845:
----------------------------------------

    Fix Version/s: 1.3.0-beta4

Looks reasonable to do for the next release

> Label constructor
> -----------------
>
>                 Key: WICKET-845
>                 URL: https://issues.apache.org/jira/browse/WICKET-845
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Sean Sullivan
>             Fix For: 1.3.0-beta4
>
>
> Currently, the Label class provides this constructor:
>           public Label(final String id, String label)
> Can this be changed to:
>           public Label(final String id, CharSequence label)
> Thanks!

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


[jira] Updated: (WICKET-845) Label constructor

Posted by "Sean Sullivan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Sullivan updated WICKET-845:
---------------------------------

    Description: 
Currently, the Label class provides this constructor:

          public Label(final String id, String label)

Can this be changed to:

          public Label(final String id, CharSequence label)

Thanks!


  was:
Currently, the Label class provides this constructor:

          public Label(final String id, String label)

Can be changed to:

          public Label(final String id, CharSequence label)

Thanks!



> Label constructor
> -----------------
>
>                 Key: WICKET-845
>                 URL: https://issues.apache.org/jira/browse/WICKET-845
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Sean Sullivan
>
> Currently, the Label class provides this constructor:
>           public Label(final String id, String label)
> Can this be changed to:
>           public Label(final String id, CharSequence label)
> Thanks!

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


[jira] Commented: (WICKET-845) Label constructor

Posted by "Sam Hough (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532056 ] 

Sam Hough commented on WICKET-845:
----------------------------------

Seems handy for optimisation. Quite often the caller will be using a StringBuilder and might make sense not to create a new String object until/if needed. Maybe just add a constructor that take CharSequence even if, for now, it immediately converts it to a String?

> Label constructor
> -----------------
>
>                 Key: WICKET-845
>                 URL: https://issues.apache.org/jira/browse/WICKET-845
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Sean Sullivan
>             Fix For: 1.3.0-beta4
>
>
> Currently, the Label class provides this constructor:
>           public Label(final String id, String label)
> Can this be changed to:
>           public Label(final String id, CharSequence label)
> Thanks!

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


[jira] Resolved: (WICKET-845) Label constructor

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-845.
----------------------------------

    Resolution: Won't Fix

charsequence is not serializable

> Label constructor
> -----------------
>
>                 Key: WICKET-845
>                 URL: https://issues.apache.org/jira/browse/WICKET-845
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Sean Sullivan
>             Fix For: 1.3.0-beta4
>
>
> Currently, the Label class provides this constructor:
>           public Label(final String id, String label)
> Can this be changed to:
>           public Label(final String id, CharSequence label)
> Thanks!

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


[jira] Commented: (WICKET-845) Label constructor

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521472 ] 

Jean-Baptiste Quenot commented on WICKET-845:
---------------------------------------------

Just curious, what's the usecase for this?

> Label constructor
> -----------------
>
>                 Key: WICKET-845
>                 URL: https://issues.apache.org/jira/browse/WICKET-845
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Sean Sullivan
>             Fix For: 1.3.0-beta4
>
>
> Currently, the Label class provides this constructor:
>           public Label(final String id, String label)
> Can this be changed to:
>           public Label(final String id, CharSequence label)
> Thanks!

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


[jira] Commented: (WICKET-845) Label constructor

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532057 ] 

Martijn Dashorst commented on WICKET-845:
-----------------------------------------

That would only confuse the matter. If you desperately need to do something like that, wrap it yourself in a IModel of some kind. The String constructor is there merely for convenience for the most common usecase.

We are not going to add constructors for Integer, Long, Date etc. too, as that would move us away from the preferred programming model.

> Label constructor
> -----------------
>
>                 Key: WICKET-845
>                 URL: https://issues.apache.org/jira/browse/WICKET-845
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Sean Sullivan
>             Fix For: 1.3.0-beta4
>
>
> Currently, the Label class provides this constructor:
>           public Label(final String id, String label)
> Can this be changed to:
>           public Label(final String id, CharSequence label)
> Thanks!

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


[jira] Commented: (WICKET-845) Label constructor

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12522861 ] 

Matej Knopp commented on WICKET-845:
------------------------------------

I also don't think there is a valid reason for doing this.

> Label constructor
> -----------------
>
>                 Key: WICKET-845
>                 URL: https://issues.apache.org/jira/browse/WICKET-845
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Sean Sullivan
>             Fix For: 1.3.0-beta4
>
>
> Currently, the Label class provides this constructor:
>           public Label(final String id, String label)
> Can this be changed to:
>           public Label(final String id, CharSequence label)
> Thanks!

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


[jira] Commented: (WICKET-845) Label constructor

Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521864 ] 

Alastair Maw commented on WICKET-845:
-------------------------------------

Do you have a particularly good reason not to just call .toString() on this? CharSequence isn't necessarily serializable, and we need to have something Serializble passed in so we can wrap it in a Model.

> Label constructor
> -----------------
>
>                 Key: WICKET-845
>                 URL: https://issues.apache.org/jira/browse/WICKET-845
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta2
>            Reporter: Sean Sullivan
>             Fix For: 1.3.0-beta4
>
>
> Currently, the Label class provides this constructor:
>           public Label(final String id, String label)
> Can this be changed to:
>           public Label(final String id, CharSequence label)
> Thanks!

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