7 Replies Latest reply on Aug 10, 2009 4:11 AM by kalex

    extended data table loading problem

      hi everyone. i use in a project the extendedDataTable component. I have a serious problem. Although it works completely fine, it gets correctly its content when an action is completed (eg a search) in the Page 1, when i go to a different page and redirect back to the Page 1, the extendedDataTable loses its content and the loading javascript appears (a loading circle) without never ending. I would like to mention that the content of the table still exists but it does not appear in the table. I do not know if this is a parameter issue to make the table keep its initial content. Thank you.
      Best Regards,
      konstantinos al.

        • 1. Re: extended data table loading problem
          ilya_shaikovsky

          1) update your version if you not using latest GA. (yes, we had such issues in previous ones)
          2) if not helps provide code please.

          • 2. Re: extended data table loading problem

            I use the Richfaces 3.3.1 GA and it's the latest one i think.

            this is the part that refers to the extended data table in the jsf page.
            When i press the delete a4j:CommandLink then the deletion happens to the db but in the table appears the loading javascript, the content is never reloaded.

            <h:form>
            <rich:extendedDataTable id="pollsDataTable" value="#{pollBackend.polls}" var="item" rendered="#{pollBackend.pollListNotEmpty}"
            height="150px" binding="#{pollBackend.pollTable}" selection="#{pollBackend.pollSelection}">

            <rich:column id="cccc" width="50px">
            <f:facet name="header">
            <h:outputLabel id="olk" value="Code" />
            </f:facet>
            <h:outputLabel id="olid" value="#{item.pollId}" />
            </rich:column>

            <rich:column id="c2" width="390px">
            <f:facet name="header">
            <h:outputLabel id="olt" value="Title" />
            </f:facet>
            <h:outputLabel id="oldes" value="#{item.description}" />
            </rich:column>
            </rich:extendedDataTable>

            <h:panelGrid id="pg3" columns="4" styleClass="buttonGrid">

            <a4j:commandLink id="cb2" action="#{pollBackend.deletePoll}" value="Delete" styleClass="actionDiv" immediate="true"/>

            </h:panelGrid>
            </h:form>

            This is the code part in the backend bean. I just change a flag and return the same page again.

            public String deletePoll(){
            pollTable.setRowKey(pollSelection.getKeys().next());
            poll = (Poll) pollTable.getRowData();
            poll.setDeleted("1"); // set this flag in order to not appear in the table
            //the table shows only the items that have poll.deleted="0"
            pollDao.updatePoll(poll);
            poll= new Poll();

            return "general"; //general is the current page that i give above
            }

            • 3. Re: extended data table loading problem
              ilya_shaikovsky

              I do not see reRender of the dataTable. And what about pollBackend? Is it request scoped?

              • 4. Re: extended data table loading problem

                the
                <a4j:commandLink reRender="pollsDataTable" id="cb2" action="#{pollBackend.deletePoll}" value="Delete" styleClass="actionDiv" immediate="true"/>
                does nothing different. The bean is session scoped. The request scope throws always huge NullPointerExceptions.

                • 5. Re: extended data table loading problem
                  ilya_shaikovsky

                  data bean could be session scoped for sure. but the binding should not be pointed to such bean. components bindings should be request scoped. learn about session bindings and JSF problems. there i nothing special to RF

                  • 6. Re: extended data table loading problem

                    thanks for your time my friend

                    • 7. Re: extended data table loading problem

                      i replaced the extendedDataTable with a scrollableDataTable and there is no problem anymore. everything works fine. I do not know what i was doing wrong. maybe wrong configuration of the extendedDataTable. Thanks again