I Have a simple
Code: Select all
<p:selectManyCheckbox id="scopeChoices" value="#{creationModel.selectedOptions}">
<f:selectItems value="#{referentielModel.requestScopeVos}" converter="scopeConverter"
var="scope" itemLabel="#{scope.name}" itemValue="#{scope}" />
</p:selectManyCheckbox>
if multiple values are selected, only the last one is posted -is set to the 'selectedOptions' Set-.
After a time-consuming debugging work, I ve figured out that this behaviour only happens when the button (p:commandButton) has not ajax set on (ajax="false")
If I remove 'ajax="false"', multi selections on my selectManyCheckBox are well taken into account. Anyone can explain me that different behaviour of post, on <p:selectManyCheckbox > ?
I HAVE tO use non ajax button, because on this action I am sending and IPC (inter portlet communication) event.
And Ajax button response cannot be cast to action Response :
Code: Select all
ExternalContext externalContext = FacesContext
.getCurrentInstance().getExternalContext();
ActionResponse actionResponse = (ActionResponse) externalContext
.getResponse();
logger.debug("Set event : " + qName);
actionResponse.setEvent(qName, requestVo);
Thanks for your help