You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Funk (JIRA)" <ji...@apache.org> on 2007/09/27 23:13:50 UTC
[jira] Updated: (WICKET-1016) ExternalLink doesn't use model
[ https://issues.apache.org/jira/browse/WICKET-1016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Funk updated WICKET-1016:
--------------------------------
Attachment: ExternalLink.patch
Hi,
would you mind testing the attached patch ExternalLink.patch to see if it meets you needs?
If it does praise about it.
> 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
> 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.