All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.inmethod.grid.column.PageLinkColumn Maven / Gradle / Ivy

The newest version!
package com.inmethod.grid.column;

import org.apache.wicket.PageReference;
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.cycle.RequestCycle;

/**
 * Displays a Link in the DataGrid to an Internal Wicket Page
 * @author Tom Burton
 */
public class PageLinkColumn extends LinkColumn
{
	private PageReference pageRef;

	public PageLinkColumn(String columnId, String propertyLabel, IModel headerModel, PageReference page)
	{
		super(columnId, propertyLabel, headerModel);
		this.pageRef = page;
	}

	public PageLinkColumn(String columnId, String propertyLabel, IModel headerModel, S sortProperty, PageReference page)
	{
		super(columnId, propertyLabel, headerModel, sortProperty);
		this.pageRef = page;
	}

	@Override
	public void onClick(IModel rowModel)
	{
		RequestCycle.get().setResponsePage(pageRef.getPage());
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy