Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2009-07-17 Thread keithrbennett
Pixologe - I am a relative beginner at Wicket, but FWIW your ideas sound reasonable and helpful. I have a link with an image, and would like to display an alternate image if the link is disabled. I understand that it should be a span element so that clicking has no effect. Can you, Igor, or

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2009-07-17 Thread keithrbennett
I got this working with the following code in the constructor of my Link subclass: http://gist.github.com/149344 ...and removing the text from the HTML element so it wouldn't display alongside the image. I don't know if this is the best way, though. It would probably make sense for me to

Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe
Dear Wicket devs, I propose that by default a disabled link should rather (or also) be marked using a behavior, instead of adding markup before and after. A word in advance: I know that I can implement my own version of Link which adds behavior in case of being disabled, and I know how to do it

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread Nino Saturnino Martinez Vazquez Wael
Why not just use an attribute modifier? pixologe wrote: Dear Wicket devs, I propose that by default a disabled link should rather (or also) be marked using a behavior, instead of adding markup before and after. A word in advance: I know that I can implement my own version of Link which adds

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe
Actually that is what I do. That's what I meant when I said implement own version... Basically it extends AjaxFallbackLink overriding onBeforeRender to add a Modifier dependent on the enabled property. Just wanted to point out that this is the behavior I would have expected by default, instead

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread Igor Vaynberg
disabled is more then just about the appearance, if something is disabled the user should not be able to interact with it. for example, security strategy can disable links the user does not have access to. just adding class=disabled leaves the link clickable. -igor On Fri, Sep 19, 2008 at 4:21

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe
Of course, you are right. Sorry, what I wrote was not completely clear. It can make sense to change the markup in order to disable a link. It definitely makes sense to exchange [a] with [span], yes. I was merely targeting at the appearance part: I think that adding markup between this [span]

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread Igor Vaynberg
On Fri, Sep 19, 2008 at 9:24 AM, pixologe [EMAIL PROTECTED] wrote: Of course, you are right. Sorry, what I wrote was not completely clear. It can make sense to change the markup in order to disable a link. It definitely makes sense to exchange [a] with [span], yes. I was merely targeting at

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe
would you mind giving a hint? igor.vaynberg wrote: On Fri, Sep 19, 2008 at 9:24 AM, pixologe [EMAIL PROTECTED] wrote: Of course, you are right. Sorry, what I wrote was not completely clear. It can make sense to change the markup in order to disable a link. It definitely makes sense to

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread Igor Vaynberg
application.getmarkupsettings() -igor On Fri, Sep 19, 2008 at 11:15 AM, pixologe [EMAIL PROTECTED] wrote: would you mind giving a hint? igor.vaynberg wrote: On Fri, Sep 19, 2008 at 9:24 AM, pixologe [EMAIL PROTECTED] wrote: Of course, you are right. Sorry, what I wrote was not

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe
setDefault*DisabledLink? I know them and I am using them, as I already wrote. Just considered it would be nice to have setDefaultDisabledLinkBehavior, too. And that I think it would be more obvious to have this applied by default. Was just a proposal, never mind. igor.vaynberg wrote:

Re: Markup for disabled Link - Proposal (add behavior instead of markup)

2008-09-19 Thread pixologe
Thanks for inspiration, igor. :) Well, it would not help the mentioned problem of not being able to change the style of an element depending on its child elements. However, as I thought about this, I realized that I could do some global changes in the weird templates and stylesheets I got, so CSS