If you want to do in serverside (with wicked), you should add a wicket tag to the 'li'. <li class="selectedItem" wicket:id="listItem"><a href="#" wicket:id="homePageLink">Home</a></li>
the java/wicket code should look something like: WebMarkupContainer listItem=new WebMarkupContainer("listItem"); listItem.add(new AttributeModifier("class", new Model("notSelectedItem"))); listItem.add(new PageLink("homePageLink", HomePage.class))); add(listItem); or as igor suggested, you could do it client side: document.getElementById(link).parentNode.className="notSelectedItem"; 2008/8/7 Igor Vaynberg <[EMAIL PROTECTED]> > you have to make it a component if you want to do it on serverside > > if you want to do it on clientside you would do something like > document.getelementbyid(link).parentnode.style.foo=bar > > -igor > > On Thu, Aug 7, 2008 at 10:15 AM, Brill Pappin <[EMAIL PROTECTED]> wrote: > > I have a case where I want to modify the css class of the dom element > that > > contains the component I'm working with. > > > > I found the wiki page: > > > http://cwiki.apache.org/WICKET/how-to-modify-an-attribute-on-a-html-tag.html > > but that will allow me to modify the component only. > > > > Specifically what I'm doing is something like: > > > > <ul> > > <li class="selectedItem"><a href="#" > > wicket:id="homePageLink">Home</a></li> > > </ul> > > > > so I actually want to modify the css class of the containing li element > (not > > the a element). > > Is it possible to do it that way, and if not, does anyone have any > > suggestions on how this might be done better? > > > > > > - Brill > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >