Re: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread prati
Hi I have got a refreshing view ,it contains list of links.I need to highlight the link when i click on that link. It works properly but if i click the next item in the list,the previous text remains highlighted. wicket:extend table cellspacing=0 class=dataview tr

Re: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread Cemal Bayramoglu
Prati, This is because you are only re-rendering the most recently selected label. One solution is keep track of the previous current selection (probably in your RefreshingView implementation - eg declare Component currentSelection;), which you update in your Link's onClick (ie currentSelecton =

Re: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread prati
Hi Cemal, Thanks for replying me,but the list gets rendered only once,and i am able to capture previous value on click but then how to move further. Regards P jWeekend wrote: Prati, This is because you are only re-rendering the most recently selected label. One solution is keep

Re: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread Cemal Bayramoglu
Prati, I'm not sure what you mean. Here's a couple of lines of code implementing what I described: if(currentSelection != null){ // you should remove existing behaviours on // currentSelection here or, // use an AtrributeModifier added, just once, to all your

Re: How to access ListItem from ListView from AjaxLink?

2010-03-11 Thread Cemal Bayramoglu
if(currentSelection != null){ // you should remove existing behaviours on // currentSelection here or, // use an AtrributeModifier added, just once, to all your // labels with a model that has logic // checking against currentSelection to // calculate

Re: How to access ListItem from ListView from AjaxLink?

2009-02-13 Thread Igor Vaynberg
final ListItem item -igor On Fri, Feb 13, 2009 at 7:36 AM, moontz bmun...@yahoo.com wrote: I would like to add an attribute to the ListItem element in the markup (basically change the class style) on click of the link. Below is my snippet. Any insight on how I can accomplish this? Thanks

Re: How to access ListItem from ListView from AjaxLink?

2009-02-13 Thread moontz
i tried that before. did not work. no compile or runtime errors, but the source did not show the change. im thinking, since its an ajax link and because only the target panel refreshes, the change to the link is not applied because the actual link is not refreshed. only the other panel is.