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.