Re: AjaxFallbackLink inside ListView

2007-09-06 Thread pokkie

Worked like a charm, thanks Kent. 

You the same Kent Tong that wrote a online Tapestry book?



Kent Tong wrote:
 
 
 
 pokkie wrote:
 
 My question is, how do I use this information to get the selected entity
 which represents a row in my listView? 
 
 
 Try:
 
 public class Test extends WebPage {
 
   public Test() {
   ListString list = Arrays.asList(new String[] { a, b, c 
 });
   ListView eachItem = new ListView(eachItem, list) {
   @Override
   protected void populateItem(ListItem item) {
   item.add(new IndicatingAjaxFallbackLink(link) 
 {
   @Override
   public void onClick(AjaxRequestTarget 
 target) {
   
 handleClick(getParent().getModelObjectAsString());
   }
 
   });
   }
   };
   add(eachItem);
   }
 
   private void handleClick(String clickedItem) {
   System.out.println(clickedItem);
   }
 }
 

-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackLink-inside-ListView-tf4389622.html#a12527658
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxFallbackLink inside ListView

2007-09-06 Thread Kent Tong



pokkie wrote:
 
 Worked like a charm, thanks Kent. 
 
 You the same Kent Tong that wrote a online Tapestry book?
 

Yep.
-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackLink-inside-ListView-tf4389622.html#a12534270
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AjaxFallbackLink inside ListView

2007-09-05 Thread pokkie

I have a listView with several rows, each row has a AjaxFallbackLink
associated with it. 

I am using the getAjaxIndicatorMarkupId() method to determine which row was
selected, it returned the 
following in my case : 

placeHolderProgramPanel_addExerciseToProgramPanel_addExerciseToNewProgramForm_programExerciseListView_6_exerciseNameSelectLink--ajax-indicator

My question is, how do I use this information to get the selected entity
which represents a row in my 
listView? 

Do I have to call get(panel_panel_form_view), which will return the view,
get the model of the view 
and see which element is at index 6 or is there another way?

Regards, 

-- pokkie
-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackLink-inside-ListView-tf4389622.html#a12515472
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]