[
https://issues.apache.org/jira/browse/WICKET-1016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Vaynberg resolved WICKET-1016.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.3.0-beta4
> ExternalLink doesn't use model
> ------------------------------
>
> Key: WICKET-1016
> URL: https://issues.apache.org/jira/browse/WICKET-1016
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Reporter: Tauren Mills
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.3.0-beta4
>
> Attachments: ExternalLink.patch
>
>
> I don't understand why ExternalLink doesn't store the external href as
> the model. It stores it in an href property. It seems to not follow
> the normal wicket way.
> This makes it difficult to do things like display a link only if the
> model is not null. For instance:
> add(new ExternalLink("web", new PropertyModel(service,"web")) {
> @Override
> public boolean isVisible() {
> return getModelObject() != null;
> }
> });
> The problem is that getModelObject() is always null, because the
> PropertyModel is stored in the href property. And since isVisible()
> is part of Component, the href property isn't accessible.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.