Thanks, I've used that (and the way I do it) in a new page on the Wiki http://www.wicket-wiki.org.uk/wiki/index.php/Extensions:datatablelinks
/Gwyn On 04/08/06, Joe Toth <[EMAIL PROTECTED]> wrote: > Thats exactly what I did...here is how I implemented it. I use this a lot, > maybe slap it in extensions? > > <wicket:panel> > <a href="#" wicket:id="link"><span > wicket:id="label">link</span></a> > > </wicket:panel> > > > package com.whatever; > > import > wicket.extensions.markup.html.repeater.data.table.PropertyColumn; > import > wicket.extensions.markup.html.repeater.refreshing.Item; > import wicket.markup.html.basic.Label > ; > import wicket.markup.html.link.Link; > import wicket.markup.html.link.PopupSettings; > import wicket.markup.html.panel.Panel; > import wicket.model.IModel; > > abstract public class LinkPropertyColumn extends PropertyColumn { > > > PopupSettings popupSettings; > > IModel labelModel; > > public LinkPropertyColumn(IModel displayModel, String sortProperty, > String propertyExpression, PopupSettings popupSettings) { > this(displayModel, sortProperty, propertyExpression); > > this.popupSettings = popupSettings; > } > > public LinkPropertyColumn(IModel displayModel, IModel labelModel) { > super(displayModel, null); > this.labelModel = labelModel; > } > > public LinkPropertyColumn(IModel displayModel, String sortProperty, > > String propertyExpression) { > super(displayModel, sortProperty, propertyExpression); > } > > public LinkPropertyColumn(IModel displayModel, String propertyExpressions) > { > super(displayModel, propertyExpressions); > > } > > @Override > public void populateItem(Item item, String componentId, IModel model) { > item.add(new LinkPanel(item, componentId, model)); > } > > public abstract void onClick(Item item, String componentId, IModel model); > > > public class LinkPanel extends Panel { > > public LinkPanel(final Item item, final String componentId, > final IModel model) { > super(componentId); > > Link link = new Link("link") { > > @Override > public void onClick() { > LinkPropertyColumn.this.onClick(item, componentId, model); > } > }; > link.setPopupSettings(popupSettings); > > add(link); > > IModel tmpLabelModel = labelModel; > > > if (labelModel == null) { > tmpLabelModel = createLabelModel(model); > } > > link.add(new Label("label", tmpLabelModel)); > } > } > > } > > > On 8/4/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > > instead of using a property column you have to implement your own column > that creates a panel/fragment with the link and text > > > > > > -Igor > > > > > > > > > > On 8/4/06, Decebal Suiu <[EMAIL PROTECTED]> wrote: > > > I created a table with wicket (1.2.1) using a > > > DataTable (DefaultDataTable) and a DataProvider > > > (SortableDataProvider). > > > My table has one column like PropertyColumn(new > > > Model("name'), name, name). > > > > > > Is it possible to have a linkable name instead of a > > > plain name? > > > > > > Here's the code: > > > > > > List<IColumn> projectColumns = new > > > ArrayList<IColumn>(); > > > projectColumns.add(new PropertyColumn(new > > > Model("name"), "name", "name")); > > > ProjectDataProvider projectDataProvider = > > > getDataProvider(); > > > DataTable projectDataTable = new > > > DefaultDataTable("projects", projectColumns, > > > projectDataProvider, 10); > > > add(projectDataTable); > > > > > > Here's my HTML: > > > > > > <wicket:extend> > > > <table wicket:id="projects" cellspacing="0" > > > cellpadding="2" > > > class="grid"></table> > > > </wicket:extend> > > > > > > Thanks, > > > Decebal > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam protection around > > > http://mail.yahoo.com > > > > > > > ------------------------------------------------------------------------- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > > opinions on IT & business topics through brief surveys -- and earn cash > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > _______________________________________________ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys -- and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > -- Download Wicket 1.2.1 now! - http://wicketframework.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user