by default if the link is disabled wicket will morph the tag, so instead of
<a href="">it will become
<em>text</em>
so you can use css selector sidebar em to style that text, but the text is not a link. you can also change the <em> globally in wicket settings to any markup you want
if you use PageLink then the link for the current page will automatically be disabled for you.
if you do want the link for the current page to remain a link you can add an attribute modifier to it, something like this:
Link link=new Link(......
link.add(new SimpleAttributeModifier("class", "active") {
boolean isEnabled() {
return logic to figure out if this lin is active or not
}
}
hope this gets you started
-Igor
On 5/18/06, Paulo Sérgio Medeiros <[EMAIL PROTECTED]
> wrote:
I don't think so :-)
Well, i took a look on them and i think i can now use it.
But before i can use it i have one question ... im building a menu for my site and in that, the link for the current page uses a diferent css class, like in this example:
<div id="sidebar"><a href=""><a class="active" href="" ">Other</a></div>
How can i set the class="active" for the current page if the menu markup is in, for example, a Panel?
ps: if is there any better way to achieve this, im opened for sugestions :-)
Thanks for help,Paulo Sérgio.
On 5/18/06, Eelco Hillenius <[EMAIL PROTECTED] > wrote:There are more ways, but Borders, Panels and Fragments are the
preferred ones (and markup inheritancee of course). Is there anything
you can't do with them?
Eelco
On 5/18/06, Paulo Sérgio Medeiros <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> im new to wicket and was wondering if 'reusable panels'
> (http://www.javalobby.org/java/forums/t60926.html) is the
> only way to reuse markup in wicket, and if there are another form of doing
> this which is the best for which cases?
>
> please, consider, when answering, 'static' markup reuse too, since im new
> using xhtml i can be missing it also.
>
> Thanks,
> Paulo Sergio.
>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
