-
1. Re: extended data table loading problem
ilya_shaikovsky Jul 24, 2009 5:51 AM (in response to kalex)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
kalex Jul 24, 2009 6:16 AM (in response to kalex)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 Jul 24, 2009 6:45 AM (in response to kalex)I do not see reRender of the dataTable. And what about pollBackend? Is it request scoped?
-
4. Re: extended data table loading problem
kalex Jul 24, 2009 7:09 AM (in response to kalex)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 Jul 24, 2009 7:30 AM (in response to kalex)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
kalex Jul 24, 2009 7:37 AM (in response to kalex)thanks for your time my friend
-
7. Re: extended data table loading problem
kalex Aug 10, 2009 4:11 AM (in response to kalex)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