Re: Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-25 Thread Azzeddine Daddah
Martijn, I tried your solustion(s), but the CSS class of the topicLabel still not updated. public TestPage() { final WebMarkupContainer container = new WebMarkupContainer("container"); container.setOutputMarkupId(true); container.add(new ListView("categories", buildCa

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Martijn Dashorst
or *always* add the attribute modifier and only output the class value when needed. Martijn On Wed, Jun 24, 2009 at 5:13 PM, Martijn Dashorst wrote: > listview.setReuseItems(true) > > Martijn > > On Wed, Jun 24, 2009 at 5:03 PM, Azzeddine Daddah wrote: >> Thanks again Vasu, >> >> I've tried your

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Martijn Dashorst
listview.setReuseItems(true) Martijn On Wed, Jun 24, 2009 at 5:03 PM, Azzeddine Daddah wrote: > Thanks again Vasu, > > I've tried your solution but it does not work yet. Below my code: > > public TestPage() { >        final WebMarkupContainer container = new > WebMarkupContainer("container"); >  

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Azzeddine Daddah
Thanks again Vasu, I've tried your solution but it does not work yet. Below my code: public TestPage() { final WebMarkupContainer container = new WebMarkupContainer("container"); container.setOutputMarkupId(true); container.add(new ListView("categories", buildCategories()

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Vasu Srinivasan
I see you are trying to add the class modifier to "item" which is ListItem and thats not a HTML component. In my case, I was adding it to the link or label. I think you may have to do something like item.add(new Label(...).add(new AttributeModifier("class", new AbstractReadOnlyModel() ... etc.

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Azzeddine Daddah
Thanks Vasu for your replay. I've tried your suggestion, but didn't work. This is what I get in the Ajax debuger when I click a certain item: ... Yeeh ... Does someone else already got the same issue? Regards, Hbiloo On Wed, Jun 24, 2009 at 12:36 PM, Vasu Srinivasan wrote: > Ive got a ver

Re: AttributeModifier not added to a ListView item via an AjaxLink

2009-06-24 Thread Vasu Srinivasan
Ive got a very similar thing working. I think you may have to return the "highlight" value dynamically. Try this alternative: item.add(new AttributeModifier("class", true, new AbstractReadOnlyModel() { @Override public Object getObject() { return "highlight" } }); On Tue, Jun 23, 2009

AttributeModifier not added to a ListView item via an AjaxLink

2009-06-23 Thread Azzeddine Daddah
Hi Wicket users, I've a ListView in a ListView. The 1st ListVeiw holds "categories". The 2nd ListView holds links (topics) which I want to be highlighted if the link (topic) is clicked. The problem is that the wrapped list (container) is getting refreshed, but the CSS class is not set for the corr