Primefaces – What to do to not lose the values ​​of the components when has some update ?

Often we need to update a form or a div and the component values ​​are lost . To solve it you need use:


Full Example:

    <p:selectManyCheckbox converter="genericEntityConverter"
                          layout="grid" columns="1">
        <f:selectItems value="#{values}" 
                   var="alt" itemLabel="#{}" 
                   itemValue="#{alt}" />
        <p:ajax event="change" process="@this" update=":form" partialSubmit="true"/>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s