0

if i want to show the selected elements in the datalist when i click on 'übernehmen' commandbutton, the List from the ManagedBean is empty, but i dont know why. My Converter works fine. No error from my console is show. All elements are in the same form. Thanks

                 <p:selectManyMenu id="standard"
                        value="#{hauptBean.standardSelektion}" converter="konverter"
                        var="t" filter="true" filterMatchMode="contains"
                        showCheckbox="true">
                        <f:selectItems value="#{hauptBean.vorbelegt}" var="risk" itemLabel="#{risk.risikobereich}" itemValue="#{risk}" />
                        <p:column>
                            <h:outputText value="#{t.risikobereich}" />
                        </p:column>
                    </p:selectManyMenu>
                    <p:commandButton value="übernehmen" update="ge" icon="ui-icon-check"/>
                    <h:outputText value="gewählt" styleClass="fetterText" />
                    <h:panelGroup />
                    <h:panelGroup id="ge">
                    <p:dataList value="#{hauptBean.standardSelektion}" var="t">
                        <h:outputText value="#{t}" />
                    </p:dataList>
                    </h:panelGroup>
user3515460
  • 159
  • 1
  • 13

1 Answers1

-1

By default, when you click the commandButton, the p:selectManyMenu will not be processed and update its selected value to the ManagedBean.
To change this behaviour you can add attribute process="standard" to your p:commandButton

Lê Thọ
  • 334
  • 1
  • 9
  • This is not correct. The default of the process attribute is `@from`. And you introduce a different issue. Please read http://stackoverflow.com/questions/25339056/understanding-process-and-update-attributes-of-primefaces – Kukeltje Jul 02 '16 at 10:17
  • No, nothing happens, the list is still empty – user3515460 Jul 08 '16 at 08:50