Add more than one component to an Item (repeaters)

2008-09-25 Thread Edgar Merino
Hello, I've got a DataTable that needs to add to each of its Items a Link and a Label, since I've only get one componentId from the populateItem(Item cellItem, String componentId, IModel model) method, I don't know what to do to be able to accomplish what I need. This is what I need:

Re: Add more than one component to an Item (repeaters)

2008-09-25 Thread Nino Saturnino Martinez Vazquez Wael
Do it as a panel..? Edgar Merino wrote: Hello, I've got a DataTable that needs to add to each of its Items a Link and a Label, since I've only get one componentId from the populateItem(Item cellItem, String componentId, IModel model) method, I don't know what to do to be able to

Re: Add more than one component to an Item (repeaters)

2008-09-25 Thread Alexandre Lenoir
You can create your own component that involves many subcomponents and add it to your datatable. Too simple? On Thu, Sep 25, 2008 at 11:28 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Do it as a panel..? Edgar Merino wrote: Hello, I've got a DataTable that needs

Re: Add more than one component to an Item (repeaters)

2008-09-25 Thread Nino Saturnino Martinez Vazquez Wael
I did it once this way: AjaxLinkPanel.java public abstract class AjaxLinkPanel extends Panel { public AjaxLinkPanel(String id, String title) { super(id); AjaxLink link = new AjaxLink(ajaxLink) { @Override public void onClick(AjaxRequestTarget target) {

Re: Add more than one component to an Item (repeaters)

2008-09-25 Thread Edgar Merino
Thank you both for the advice, already working, thank you. Nino Saturnino Martinez Vazquez Wael escribió: I did it once this way: AjaxLinkPanel.java public abstract class AjaxLinkPanel extends Panel { public AjaxLinkPanel(String id, String title) { super(id); AjaxLink link

Re: Add more than one component to an Item (repeaters)

2008-09-25 Thread John Krasnay
I keep a little library of these (LinkPanel, BookmarkablePageLinkPanel, etc.) that are all just a link containing a label. It would be nice if they were part of Wicket proper. Does anyone else think so? jk On Thu, Sep 25, 2008 at 12:10:17PM +0200, Nino Saturnino Martinez Vazquez Wael wrote: I