org.wicketstuff.egrid.column.EditableRequiredDropDownCellPanel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wicketstuff-editable-grid Show documentation
Show all versions of wicketstuff-editable-grid Show documentation
Add/Edit/Delete functionality all at once
package org.wicketstuff.egrid.column;
import java.util.List;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.FormComponent;
/**
*
* @author Nadeem Mohammad
*
*/
public class EditableRequiredDropDownCellPanel extends EditableCellPanel
{
private static final long serialVersionUID = 1L;
public EditableRequiredDropDownCellPanel(final String id, final PropertyColumn column, @SuppressWarnings("rawtypes") final List choices)
{
super(id);
@SuppressWarnings("unchecked")
DropDownChoice field = new DropDownChoice("dropdown", choices);
field.setLabel(column.getDisplayModel());
add(field);
}
@Override
public FormComponent> getEditableComponent()
{
return (FormComponent>) get("dropdown");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy