I checked in the showcase, but does not work well. (http://www.primefaces.org/showcase/ui/d ... List.xhtml)
Could someone provide an example of how to use these buttons?
The following code:
XHTML:
Code: Select all
<p:pickList id="plColumnsCarTable" value="#{dataView.columnsCarsTable}" var="column" converter="columnCarModelConvert"
itemValue="#{column.property}" itemLabel="#{column.header}" showTargetControls="true">
<p:ajax event="transfer" listener="#{dataView.onTransfer}" />
</p:pickList>
Code: Select all
private DualListModel<ColumnCarTableModel> columnsCarsTable;
@PostConstruct
public void init() {
this.addDualListCarsTable();
}
private void addDualListCarsTable() {
List<ColumnCarTableModel> source = new ArrayList<ColumnCarTableModel>();
List<ColumnCarTableModel> target = new ArrayList<ColumnCarTableModel>();
source.add(new ColumnCarTableModel("id"));
source.add(new ColumnCarTableModel("year"));
source.add(new ColumnCarTableModel("brand"));
source.add(new ColumnCarTableModel("color"));
source.add(new ColumnCarTableModel("sold"));
source.add(new ColumnCarTableModel("price"));
this.columnsCarsTable = new DualListModel<ColumnCarTableModel>(source, target);
}
public void onTransfer(TransferEvent event) {
}