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
Priority: Minor
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.