You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2013/06/13 14:31:21 UTC

[jira] [Commented] (WICKET-4904) Use a behavior that modifies AbstractLink's markup when disabled

    [ https://issues.apache.org/jira/browse/WICKET-4904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13682183#comment-13682183 ] 

Sven Meier commented on WICKET-4904:
------------------------------------

Now we have #beforeDisabledLink and #afterDisabledLink in AbstractLink, but the object doesn't use it by itself :(.

IMHO it would be better to
- remove IMarkupSettings#getDefault*DisabledLink()
- remove AbstractLink#*DisabledLimk
- give DisableLinkBehavior two constructor arguments "beforeDisabledLink" and "afterDisabledLink"

So by default the markup of a link is *not* tampered with. If someone wants to restore the old setting, he can add a DisableLinkBehavior to all AbstractLinks via a IComponentInstantiationListener.
If he wants something completely different, he can register his own behavior.

Isn't that simpler?
                
> Use a behavior that modifies AbstractLink's markup when disabled
> ----------------------------------------------------------------
>
>                 Key: WICKET-4904
>                 URL: https://issues.apache.org/jira/browse/WICKET-4904
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.3.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 7.0.0
>
>         Attachments: WICKET-4904.patch
>
>
> Currently Wicket transforms <a> tag to <span><em> when a link is disabled.
> Recently Wicket-Bootstrap user filed issue https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/79 that this breaks the UI because Twitter Bootstrap needs just 'disabled="disabled"' attribute in <a>.
> With the new strategy it will be possible to set global strategy and override it per link.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira