You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Peter Dotchev (JIRA)" <ji...@apache.org> on 2009/11/23 13:57:39 UTC

[jira] Created: (WICKET-2588) ExternalLink to take IModel instead of IModel for label

ExternalLink to take IModel<?> instead of IModel<String> for label
------------------------------------------------------------------

                 Key: WICKET-2588
                 URL: https://issues.apache.org/jira/browse/WICKET-2588
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.4.1
            Reporter: Peter Dotchev
            Priority: Minor
             Fix For: 1.5-M1


I just noticed that this constructor 
    public ExternalLink(final String id, final IModel<String> href, final IModel<String>* label) 
takes  IModel<String> for label. 
This is somewhat limiting since the model could hold a number or a date for example. 
Actually passing a raw IModel with any object inside works just fine. 

It would be more appropriate if this constructor takes IModel<?> for the 
label as done in Label constructor. 
Unfortunately ExternalLink offers a public method getLabel() that 
returns the label as IModel<String>. 
So it seems changing it would break compatibility. 


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


[jira] Resolved: (WICKET-2588) ExternalLink to take IModel instead of IModel for label

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

Juergen Donnerstag resolved WICKET-2588.
----------------------------------------

    Resolution: Fixed
      Assignee: Juergen Donnerstag

thanks

> ExternalLink to take IModel<?> instead of IModel<String> for label
> ------------------------------------------------------------------
>
>                 Key: WICKET-2588
>                 URL: https://issues.apache.org/jira/browse/WICKET-2588
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.1
>            Reporter: Peter Dotchev
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.5-M1
>
>
> I just noticed that this constructor 
>     public ExternalLink(final String id, final IModel<String> href, final IModel<String>* label) 
> takes  IModel<String> for label. 
> This is somewhat limiting since the model could hold a number or a date for example. 
> Actually passing a raw IModel with any object inside works just fine. 
> It would be more appropriate if this constructor takes IModel<?> for the 
> label as done in Label constructor. 
> Unfortunately ExternalLink offers a public method getLabel() that 
> returns the label as IModel<String>. 
> So it seems changing it would break compatibility. 

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