selectmanycheckbox

h:selectManyCheckbox with omnifaces.SelectItemsConverter does not preselect the items

≡放荡痞女 提交于 2020-01-05 04:03:31
问题 I'm using JSF 2.0, PrimeFaces and OmniFaces. I have 2 dialogs with <h:selectManyCheckbox> . The first dialog creates a new Course : The Disciplina s are presented as: <h:selectManyCheckbox id="disciplinas" value="#{cursoMBean.listaDisciplinasDoCurso}" converter="omnifaces.SelectItemsConverter"> <f:selectItems value="#{cursoMBean.listaTodasDisciplinas}" var="disciplina" itemValue="#{disciplina}" itemLabel="#{disciplina.nome}" /> </h:selectManyCheckbox> This works fine. When I select some

com.sun.faces.renderkit.html_basic.MenuRenderer createCollection: Unable to create new Collection instance for type java.util.Arrays$ArrayList

给你一囗甜甜゛ 提交于 2019-12-30 04:43:07
问题 I'm trying to use JSF / SelectManyCheckBox tag with an enum : Here is my xhtml code : <h:form id="searchForm"> <h:panelGrid columns="2"> <h:outputText value="Searched queues" /> <h:panelGroup> <h:selectManyCheckbox layout="pageDirection" value="#{jmsErrorController.errorSearchCriteria.searchedQueues}" converter="queueConverter"> <f:selectItems value="#{jmsErrorController.completeQueueList}" /> </h:selectManyCheckbox> </h:panelGroup> </h:panelGrid> <h:commandButton action="#{jmsErrorController

Primefaces ManyCheckbox inside ui:repeat calls setter method only for last loop

删除回忆录丶 提交于 2019-12-13 16:45:24
问题 I have a <p:selectManyCheckbox> inside <ui:repeat> , getting it's items from a List of a certain Object Class (provided by <ui:repeat> -variable) and is supposed to save the chosen items into another List of the same Object Class. But it calls the setter method #{cartBean.setSelectedExtras} only for the last entry (last iteration of <ui:repeat> ). <ui:repeat var="item" value="#{category.items}"> <p:selectManyCheckbox id="extraCheckbox" value="#{cartBean.selectedExtras}" layout="pageDirection"

h:selectManyChexkbox`s <f:ajax event=“click” listener doesn't fire and gives an error

时光怂恿深爱的人放手 提交于 2019-12-11 04:22:51
问题 I want to fire an event change listener when the user selects / deselects something in the h:selectManyCheckbox, if it leaves it alone nothing should happen. My xhtml: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp

Select all items in Multiple SelectManyCheckBox with dynamic ids

与世无争的帅哥 提交于 2019-12-03 22:24:55
问题 I want to select all check box in some groups of checkboxes using PrimeFaces component on top of JSF. My code is like this: <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5"> <p:outputLabel value="Confere:" style="font-weight:bold!important" /> <p:selectManyCheckbox value="#{funcionarioBean.funcionario.permissaoConfere.stringArray}"> <f:selectItem itemLabel="Consulta" itemValue="C" /> <f:selectItem itemLabel="Edição" itemValue="E" /> <f:selectItem itemLabel="Deleção"

How to enable/disable item in selecManyCheckbox based on flag

ぐ巨炮叔叔 提交于 2019-12-02 09:11:34
问题 I need your help in disabling and enabling an item from the selectManyCheckbox component in a jsf page. First of all, the selectManyCheckbox component is showing three chechboxes which are (Loan - Health - Transfer). The list will be populated from a bean which it has the code: private List<hrCertificate> hrCertificatesList = new ArrayList<hrCertificate>(); //Getter and Setter Private String loanFlag=""; @PostConstruct public void init() { this.hrCertificatesList.add(new hrCertificate(("Loan"

How to enable/disable item in selecManyCheckbox based on flag

自作多情 提交于 2019-12-02 06:44:15
I need your help in disabling and enabling an item from the selectManyCheckbox component in a jsf page. First of all, the selectManyCheckbox component is showing three chechboxes which are (Loan - Health - Transfer). The list will be populated from a bean which it has the code: private List<hrCertificate> hrCertificatesList = new ArrayList<hrCertificate>(); //Getter and Setter Private String loanFlag=""; @PostConstruct public void init() { this.hrCertificatesList.add(new hrCertificate(("Loan"), "LC")); this.hrCertificatesList.add(new hrCertificate(("Health"), "HI")); this.hrCertificatesList

How to use SelectManyCheckbox with two ArrayList? - Primefaces

元气小坏坏 提交于 2019-12-02 01:06:58
问题 I'm trying to implement a <p:selectManyCheckbox> but I'm having no success. Now I have the following architecture: Course - have many Disciplines Discipline - belongs to none, one or many Courses. In Course class I have two ArrayList<Discipline> : public class CourseMBean{ (...) // Stores all disciplines private static ArrayList<Discipline> allDisciplines; // Stores only the disciplines that's already associated with this course. private static ArrayList<Discipline> courseDisciplines; (get

How to use SelectManyCheckbox with two ArrayList? - Primefaces

送分小仙女□ 提交于 2019-12-01 21:13:21
I'm trying to implement a <p:selectManyCheckbox> but I'm having no success. Now I have the following architecture: Course - have many Disciplines Discipline - belongs to none, one or many Courses. In Course class I have two ArrayList<Discipline> : public class CourseMBean{ (...) // Stores all disciplines private static ArrayList<Discipline> allDisciplines; // Stores only the disciplines that's already associated with this course. private static ArrayList<Discipline> courseDisciplines; (get and set for the arraylists) (...) } All data comes from a MYSQL DB, but that isn't the question. Now I

Select all items in Multiple SelectManyCheckBox with dynamic ids

血红的双手。 提交于 2019-12-01 09:39:39
I want to select all check box in some groups of checkboxes using PrimeFaces component on top of JSF. My code is like this: <h:panelGrid columns="2" style="margin-bottom:10px" cellpadding="5"> <p:outputLabel value="Confere:" style="font-weight:bold!important" /> <p:selectManyCheckbox value="#{funcionarioBean.funcionario.permissaoConfere.stringArray}"> <f:selectItem itemLabel="Consulta" itemValue="C" /> <f:selectItem itemLabel="Edição" itemValue="E" /> <f:selectItem itemLabel="Deleção" itemValue="D" /> <f:selectItem itemLabel="Inclusão" itemValue="I" /> <f:selectItem itemLabel="Relatório"