0

I am using selectCheckboxMenu from primefaces, but i need to know which item was checked here is my code:

<p:selectCheckboxMenu
                            label=""
                            id="cboBiblioteca" 
                            filter="true" filterMatchMode="contains"
                            required="false"
                            widgetVar="cboBiblioteca"
                            value="#{documentalBean.sbiblioteca}"
                            style="width:20px">
                            <p:ajax event="change" listener="#{documentalBean.checkBiblioteca()}"/>
                            <f:selectItems value="#{bibliotecaBean.bibliotecas}" var="biblioteca"  itemLabel="#{biblioteca.NOMBRE_BIBLIOTECA.toLowerCase()}" itemValue="#{biblioteca.ID_BIBLIOTECA_MEDIADOR}"/>
                        </p:selectCheckboxMenu>

my "sbiblioteca" array is a String array, when i whatch it on the debugger i cant get the last checked, because they arent added to the last they are added according to their position in the list.

1 Answer 1

0

Store the 'last -1' list and compare with the 'last'... Simple... Just like you would in plain java... See differences between two arrays

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.