10 Replies Latest reply on Jan 20, 2011 11:41 AM by Daniel Yang

    Is it a bug or I did something wrong?

    Daniel Yang Novice

      I hava an input component that has required property and a richfaces panel with a datatable nested in a form. In every row of databable, there is an input component, I want to delete user 7 and I also want the data I typed in  are kept in input components after I deleted the user 7.

      Snap1.gif

      My page:

      <h:form id="mainForm">

                      <h:inputText value="#{testBean.key}" required="true"/>

                      <rich:panel id="panel1" header="User" style="width:270px;">

                          <h:dataTable value="#{testBean.list}" var="u">

                              <h:column>

                                  <f:facet name="header">

                                      <h:outputText value="ID"/>

                                  </f:facet>

                                  <h:outputText value="#{u.id}"/>

                              </h:column>

                             

                                <h:column>

                                  <f:facet name="header">

                                      <h:outputText value="Name"/>

                                  </f:facet>

                                  <h:outputText value="#{u.name}"/>

                              </h:column>

                             

                              <h:column>

                                  <f:facet name="header">

                                      <h:outputText value="Info."/>

                                  </f:facet>

                                  <h:inputText value="#{u.info}"/>

                              </h:column>

                             

                              <h:column>

                                  <f:facet name="header">

                                      <h:outputText value="Operation"/>

                                  </f:facet>

                                  <a4j:commandLink value="Del"

                                                action="#{testBean.deleteUser}"

                                                ajaxSingle="true"

                                                process="panel1"

                                                reRender="panel1"/>

                              </h:column>

                          </h:dataTable>

                      </rich:panel>

                  </h:form>

       

      Managed bean is very simple.

       

      The problem is : after I deleted user 7 in the datatable,  user 8 (row) also deleted at the same time, it is say that the action execute twice when I  deleting the user 7.

      Snap2.gif

      If I removed the property process="panel1" of the a4j:commanLink, user 7 deleted correctly, but the data I typed didn't kept.

      Snap3.gif

      JSF 1.2  RichFaces 3.3 Final