Re: About AbstractLink
Sent from my BlackBerry® powered by Sinyal Kuat INDOSAT -Original Message- From: Heitor Machado Date: Fri, 21 Jan 2011 14:08:25 To: Reply-To: users@wicket.apache.org Subject: Re: About AbstractLink Very nice, tanks Jeremy, but the main question is not about SPANs X DIVs, or whatever. And even with this nice snipet, should all disabled links in my app appear with DIVs ? Without exceptions ? tanks Heitor
Re: About AbstractLink
no, they will replace the span. and iirc was changed to a while back as the default -igor On Fri, Jan 21, 2011 at 8:42 AM, Martin Grigorov wrote: > On Fri, Jan 21, 2011 at 5:26 PM, Igor Vaynberg wrote: > >> afaik anchors in html do not support a disabled attribute. so the only >> way to make it really unclickable is to not render it as an anchor. >> >> of course you can change that by tweaking Jeremy's example >> >> >> WebApplication.get().getMarkupSettings().setDefaultBeforeDisabledLink(""); >> >> WebApplication.get().getMarkupSettings().setDefaultAfterDisabledLink(""); >> > > Am I wrong or these methods replace the default with / and the > Heitor talks about is still inside them ? > >> >> -igor >> >> On Fri, Jan 21, 2011 at 5:19 AM, Heitor Machado >> wrote: >> > Hi all, >> > >> > I noticed some days ago that the AbstractLink component when disabled, >> > render itself as a span. >> > Is there some especific motivation for that ? >> > >> > I´m asking because I think that a component/element does not have to >> change >> > itself in that way, its suposed to be a responsability of its holder, and >> > any way, why a span ? All applications should render a span instead of an >> > anchor when that anchor was disabled? Could I perhaps change it´s css >> class >> > and strip its actions ? Or nor even render it ? >> > >> > Of course we can override the disableLink of AbstractLink (this is the >> > method that does the magic), but it becomes a problem because now we >> *have* >> > to do it. >> > One of the characteristics that I like most in wicket is freedom, I can >> use >> > whatever css and javascript the way I want, I can model my application in >> > any way I like it, and this is a point of advantage of wicket over other >> > frameworks, wicket is not pervasive, and the way that method is wrote is >> > very pervasive. >> > >> > Cheers >> > Heitor >> > >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: About AbstractLink
On Fri, Jan 21, 2011 at 5:26 PM, Igor Vaynberg wrote: > afaik anchors in html do not support a disabled attribute. so the only > way to make it really unclickable is to not render it as an anchor. > > of course you can change that by tweaking Jeremy's example > > > WebApplication.get().getMarkupSettings().setDefaultBeforeDisabledLink(""); > > WebApplication.get().getMarkupSettings().setDefaultAfterDisabledLink(""); > Am I wrong or these methods replace the default with / and the Heitor talks about is still inside them ? > > -igor > > On Fri, Jan 21, 2011 at 5:19 AM, Heitor Machado > wrote: > > Hi all, > > > > I noticed some days ago that the AbstractLink component when disabled, > > render itself as a span. > > Is there some especific motivation for that ? > > > > I´m asking because I think that a component/element does not have to > change > > itself in that way, its suposed to be a responsability of its holder, and > > any way, why a span ? All applications should render a span instead of an > > anchor when that anchor was disabled? Could I perhaps change it´s css > class > > and strip its actions ? Or nor even render it ? > > > > Of course we can override the disableLink of AbstractLink (this is the > > method that does the magic), but it becomes a problem because now we > *have* > > to do it. > > One of the characteristics that I like most in wicket is freedom, I can > use > > whatever css and javascript the way I want, I can model my application in > > any way I like it, and this is a point of advantage of wicket over other > > frameworks, wicket is not pervasive, and the way that method is wrote is > > very pervasive. > > > > Cheers > > Heitor > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: About AbstractLink
afaik anchors in html do not support a disabled attribute. so the only way to make it really unclickable is to not render it as an anchor. of course you can change that by tweaking Jeremy's example WebApplication.get().getMarkupSettings().setDefaultBeforeDisabledLink(""); WebApplication.get().getMarkupSettings().setDefaultAfterDisabledLink(""); -igor On Fri, Jan 21, 2011 at 5:19 AM, Heitor Machado wrote: > Hi all, > > I noticed some days ago that the AbstractLink component when disabled, > render itself as a span. > Is there some especific motivation for that ? > > I´m asking because I think that a component/element does not have to change > itself in that way, its suposed to be a responsability of its holder, and > any way, why a span ? All applications should render a span instead of an > anchor when that anchor was disabled? Could I perhaps change it´s css class > and strip its actions ? Or nor even render it ? > > Of course we can override the disableLink of AbstractLink (this is the > method that does the magic), but it becomes a problem because now we *have* > to do it. > One of the characteristics that I like most in wicket is freedom, I can use > whatever css and javascript the way I want, I can model my application in > any way I like it, and this is a point of advantage of wicket over other > frameworks, wicket is not pervasive, and the way that method is wrote is > very pervasive. > > Cheers > Heitor > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: About AbstractLink
On Fri, Jan 21, 2011 at 10:08 AM, Heitor Machado wrote: > Very nice, tanks Jeremy, but the main question is not about SPANs X DIVs, > or > whatever. And even with this nice snipet, should all disabled links in my > app appear with DIVs ? Without exceptions ? > > A link doesn't have corresponding markup (as a separate markup file). So, it has to be set programmatically. So, you can set a default (like I showed before), and individual links can have AbstractLink#setAfterDisabledLink called. (and setBefore) -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: About AbstractLink
Very nice, tanks Jeremy, but the main question is not about SPANs X DIVs, or whatever. And even with this nice snipet, should all disabled links in my app appear with DIVs ? Without exceptions ? tanks Heitor
Re: About AbstractLink
WebApplication.get().getMarkupSettings().setDefaultBeforeDisabledLink(""); WebApplication.get().getMarkupSettings().setDefaultAfterDisabledLink(""); On Fri, Jan 21, 2011 at 7:19 AM, Heitor Machado wrote: > Hi all, > > I noticed some days ago that the AbstractLink component when disabled, > render itself as a span. > Is there some especific motivation for that ? > > I´m asking because I think that a component/element does not have to change > itself in that way, its suposed to be a responsability of its holder, and > any way, why a span ? All applications should render a span instead of an > anchor when that anchor was disabled? Could I perhaps change it´s css class > and strip its actions ? Or nor even render it ? > > Of course we can override the disableLink of AbstractLink (this is the > method that does the magic), but it becomes a problem because now we *have* > to do it. > One of the characteristics that I like most in wicket is freedom, I can use > whatever css and javascript the way I want, I can model my application in > any way I like it, and this is a point of advantage of wicket over other > frameworks, wicket is not pervasive, and the way that method is wrote is > very pervasive. > > Cheers > Heitor > -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*