This is the pick list definition
Code: Select all
<p:pickList id="queuesPickList"
value="#{manageApplications.dualListQueuesToBeAddedToTheApplication}"
var="queueToAdd" itemLabel="#{queueToAdd}" itemValue="#{queueToAdd}">
</p:pickList>
Code: Select all
private List<String> queuesSouce = new ArrayList<>();
private List<String> queuesTarget = new ArrayList<>();
private DualListModel<String> dualListQueuesToBeAddedToTheApplication;
The list load properly and I am able to manage object one side another.
Until this part everything looks good. The source and target objects loads successfully and the pick list is functional. Immediately after creating the dualList I am listing the contents for source and target and both are there.
There is a button down below to save the changes made by calling an actionListener.
Code: Select all
<p:commandButton value="SAVE" id="saveQueuesButton"
actionListener="#{manageApplications.saveQueuesToTheApplication()}"
oncomplete="PF('dlgAddQueuesToApplication').hide();"
update="addQueuesToApplicationPanel">
</p:commandButton>
Code: Select all
public void saveQueuesToTheApplication() {
System.out.println(this.dualListQueuesToBeAddedToTheApplication.getTarget());
}
Reading the Primefaces documentation it says that the converter is needed to deal with you own type. Since I am using plain vanilla List of Strings that is the native object for the pickList component I didn't bother to build the converter class.
What Am I doing wrong?
best regards, Neliosam