wood burning stoves
The moose likes Java in General and the fly likes wicket DefaultDataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "wicket DefaultDataTable" Watch "wicket DefaultDataTable" New topic

wicket DefaultDataTable


Joined: Jun 19, 2008
Posts: 2
I created a wicket DefaultDataTable showing my data. Now i need to edit every rows. How can i do this ??
Thank you very much.

Here my code :

ListSortableDataProvider provider = new ListSortableDataProvider(){
public void refresh(List list) {

List<LinkPropertyColumn> columns = Arrays.asList(
new LinkPropertyColumn(new Model("Codice"), null, "tpCode"),
new LinkPropertyColumn(new Model("Descrizione"), null, "tpName"),
new LinkPropertyColumn(new Model("Codice Gruppo"), null, "tpGrpCode"),
new LinkPropertyColumn(new Model("Descrizione Gruppo"), null, "tpGrpName")

final DefaultDataTable ajaxTable = new DefaultDataTable("RequestTable", columns, provider, 20);
ajaxTable.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(10)){
protected void onPostProcessTarget(AjaxRequestTarget target) {
And the inner class :
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);

public void populateItem(Item item, String componentId, IModel model) {
item.add(new LinkPanel(item, componentId, model));

public void onClick(Item item, String componentId, IModel model) {

public class LinkPanel extends Panel {

public LinkPanel(final Item item, final String componentId,
final IModel model) {

Link link = new Link("link") {

public void onClick() {
LinkPropertyColumn.this.onClick(item, componentId, model);



IModel tmpLabelModel = labelModel;

if (labelModel == null) {
tmpLabelModel = createLabelModel(model);
link.add(new Label("label", tmpLabelModel));
I agree. Here's the link: http://aspose.com/file-tools
subject: wicket DefaultDataTable
It's not a secret anymore!