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

org.uqbar.wicket.xtend.XListView.xtend Maven / Gradle / Ivy

package org.uqbar.wicket.xtend

import java.util.List
import org.apache.wicket.markup.html.list.ListItem
import org.apache.wicket.markup.html.list.ListView
import org.apache.wicket.model.IModel
import org.eclipse.xtend.lib.annotations.Accessors
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1

/**
 * Extends wicket's {@link ListView} to adapt it
 * to use xtend's closures.
 * By introducing composition instead of inheritance.
 * 
 * @author jfernandes
 */
@Accessors
class XListView extends ListView {
	Procedure1> populateItem

	new(String id) { super(id)	}
	new(String id, IModel> model) { super(id, model) }
	new(String id, List list) { super(id, list) }

	override populateItem(ListItem item) {
		populateItem.apply(item)
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy