1 Reply Latest reply on Jul 15, 2011 12:05 PM by Val Blant

    RF4: ajax input inside dataTable can't rerender footer cells

    Val Blant Newbie

      Hello.

       

      I was wondering if anyone found a workaround for this.

       

      Let's say we have the following simple test table:

       

      {code}

      <rich:dataTable id="testTable"

                value="#{dataTableTestBackingBean.rowsModel}"

                var="rowVar">

       

                <f:facet name="header">

                          <rich:column>

                                    <h:outputText value="Column 1" />

                          </rich:column>

                </f:facet>

       

                <rich:column>

                          <h:inputText id="valTest" value="#{rowVar.col1}" >

                                  <a4j:ajax

                                            event="blur"

                                            render="testColumn, footerTest"

                                            limitRender="true"

                                            execute="@this" />

                          </h:inputText>

                </rich:column>

                <rich:column>

                          <h:outputText id="testColumn" value="#{dataTableTestBackingBean.footerValue}" />

                </rich:column>

       

       

                <f:facet name="footer">

                          <rich:column>

                                    <h:outputText id="footerTest" value="#{dataTableTestBackingBean.footerValue}" />

                          </rich:column>

                </f:facet>

       

       

      </rich:dataTable>

       

      {code}

       

      The problem is that the AJAX response comes back from the server with the wrong ID for the footer cell. It is referencing "formId:testTable:0:footerTest" instead of the correct "formId:testTable:footerTest", so nothing is updated due to a javascript error:

       

      {quote}

      Error: During update: formId:testTable:0:footerTest not found

      {quote}

       

      The bug is inside org.richfaces.context.ComponentIdResolver. where it looks up the clientId for the footer cell w/o properly resetting the rowKey.

       

      Has anyone managed to work around this problem?