0

I have selectOneMenu in footer of my dataTable and i am trying to submit a bunch of footer items to backing bean to save them.Please see image to understand. Problem is when i am submitting with commandButton which is also in footer p:selectOneMenu and p:selectBooleanCheckbox do not sets the value in backing and they are null.

http://code.google.com/p/primefaces/issues/detail?id=4681

Please look at the attached image as well.

Thanks in advance

Here is the code in my facelet:

                    <p:dataTable id="dataTable" value="#{dataRoleBackingBean.dataRoleList}" var="dataRoleOb">
                        <p:column headerText="Security Group">
                                #{dataRoleOb.secGroupName}
                                <f:facet name="footer">
                                    <p:selectOneMenu id="tableSecGroupID" value="#{dataRoleBackingBean.tableSecGroupID}" style="width:90px">
                                            <f:selectItems value="#{dataRoleBackingBean.securityGroupList}" var="secGroup" itemLabel="#{secGroup.shortName}"
                                                itemValue="#{secGroup.secGroupId}" />
                                    </p:selectOneMenu>
                                </f:facet>
                        </p:column>

                        <p:column headerText="Remove">

                                <f:facet name="footer">
                                    <p:commandButton value="Add" update="@form" action="#{dataRoleBackingBean.addRow}"/>
                                </f:facet>

                        </p:column>

                    </p:dataTable>

Just letting you know same code works fine with primefaces 3.3.1 & 3.3

smubasher
  • 43
  • 1
  • 9

1 Answers1

1

I have the same problem when migrate from 3.3.1 to 3.4. I've tried using 3.4.1 and this also occurs. Only one thing to add, this occurs only when DataTable already has a row. If DataTable is empty doesn't occur. When debug, property's setter is called twice, first time with correct value and second time with null value.

lugolu
  • 86
  • 1
  • 7