2

I'm using primefaces selectCheckboxMenu with multiple= "true". I'm having 2 issues with this tag now.

  1. That token at right side of the checkboxmenu is not aligned properly
  2. Unable to see the label attribute value when multiple="true".

Can anyone help me with this?

I'm attaching a sample code with this question.

<h:panelGroup  class="ui-grid ui-grid-responsive ui-fluid">
                    <p:panelGrid layout="grid" columns="3" columnClasses="ui-grid-col-4,ui-grid-col-8,ui-grid-col-2">
                        <h:panelGroup>
                            <p:outputLabel for="item1" value="Item1:" styleClass="required" />
                            <BR />
                            <p:selectOneMenu id="item1" value="#{myObj.prop1.alpha}">
                                <f:selectItem itemLabel="-Choose One-" itemValue="" />
                                <f:selectItems value="#{mymethod.getSimpleCategoryList('13521')}" var="labelValue" itemLabel="#{labelValue.label}"
                                    itemValue="#{labelValue.value}" />
                            </p:selectOneMenu>
                        </h:panelGroup>
                        <h:panelGroup>
                            <p:outputLabel for="item2" value="item2:" styleClass="required" />
                            <BR />
                            <p:selectCheckboxMenu id="item2" value="#{myObj.prop1.beta}" label="myLabel" filter="true" filterMatchMode="startsWith" multiple="true">
                                <f:selectItems value="#{myBean.allBeta}"  var="labelValue" itemLabel="#{labelValue.label}"
                                    itemValue="#{labelValue.value}"/>
                            </p:selectCheckboxMenu>
                        </h:panelGroup>
                        <h:panelGroup styleClass="Fright">
                            <h:panelGroup class="EmptyBox20" />
                            <p:commandButton id="addToListBtn" icon="fa fa-plus" title="Add to List" styleClass="blueButton" action="#{myBean.saveItem(myObj)}"
                            value="Add to List"/>
                        </h:panelGroup>
                    </p:panelGrid>
</h:panelGroup>
Kukeltje
  • 12,223
  • 4
  • 24
  • 47
ARK
  • 35
  • 8
  • 3
    You didn't mention your version of PrimeFaces or theme? It works fine here: https://www.primefaces.org/showcase/ui/input/checkboxMenu.xhtml so it have a feeling you have custom CSS that is causing the issues. – Melloware Apr 24 '20 at 11:36
  • I'm using PrimeFaces 5.3.21 – ARK Apr 24 '20 at 11:43
  • I've just edited my question. because I could solve 2 isues – ARK Apr 24 '20 at 11:45
  • 1
    Create separate questions... so answers and titles (yours is effectively not saying much explicitly) can be specific!. And **always** create a [mcve] – Kukeltje Apr 24 '20 at 13:51
  • 1
    Hi @Kukeltje, were you able to fix this issue ? I am also facing the same issue with primefaces 7 – Jainesh kumar Oct 20 '20 at 09:58

0 Answers0