org.uqbar.wicket.xtend.XLoadableDetachableModel Maven / Gradle / Ivy
package org.uqbar.wicket.xtend;
import org.apache.wicket.model.LoadableDetachableModel;
import org.eclipse.xtext.xbase.lib.Functions.Function0;
/**
* Subclasses LoadableDetachableModel to delegate the load method to a function
* object so it can be used with xtend closures.
* @author jfernandes
*/
@SuppressWarnings("all")
public class XLoadableDetachableModel extends LoadableDetachableModel {
private Function0 function;
public XLoadableDetachableModel(final Function0 aFunction) {
this.function = aFunction;
}
protected T load() {
return this.function.apply();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy