a link doesn't repaint itself automatically, you have to add it to the AjaxRequestTarget in the onclick handler.
Martijn On Sat, Apr 18, 2009 at 12:57 AM, Jason Novotny <[email protected]> wrote: > > Hi, > > I have code to create an ajax link and I want it to dynamically adjust its > css class when clicked. This doesn't work since I don't think the > onComponentTag is being called. > > final AjaxLink link = new AjaxLink("navlink") { > @Override > public void onClick(AjaxRequestTarget target) { > > } > > public void onComponentTag(ComponentTag tag) { > super.onComponentTag(tag); > if (foo == 77) { > tag.put("class", "secondaryCurrent"); > } > } > > }; > > Any help is greatly appreciated! > > Thanks, Jason > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
