I can’t select multiple objects from my components

Asked

Viewed 97 times

2

I am using a component of the primefaces, only when I select several items of this component I cannot select.

I am using an Enum, it needs to be an arrayList?

<h:outputLabel for="servico" value="Serviço:" />
    <p:selectCheckboxMenu id="servico" value="#{servicoBean.servico.tipoServico}" label="-- Selecione --" multiple="true"
          filter="true" filterMatchMode="startsWith" panelStyle="width:250px" required="true">
          <f:selectItems value="#{servicoBean.tipoServicos}" var="tpServ" itemLabel="#{tpServ.descricao}" itemValue="tpServ" />
    </p:selectCheckboxMenu>
  • Made like your own #{servicoBean.tipoServicos} is being filled in.

1 answer

0

The variable serviceBean.servico.serviceServico must be a type that receives several objects, but you will also need a converter because selectItems is filled with Selectitem objects and not with Typoservico.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.