Hello - I'm excited about 1.1 and some of the new features. After having problems with Ajax4Jsf and Quipukit playing well together I was excited to see the improved integration with the two technologies. I was trying to use the q_refreshTable method and I am receiving the following error in the browser:
"Error while performing Ajax request: illegal response - couldn't find data start marker. Response length: 75080"
And the following error on the server:
13:24:50,957 ERROR PhaseListenerManager Exception in PhaseListener RESTORE_VIEW(1) afterPhase
javax.faces.el.EvaluationException: Exception while invoking expression #{ledgerAction.fetchLedgerTransactions}
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:165)
at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:59)
.....
Caused by: java.lang.IllegalStateException: No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)
at org.jboss.seam.contexts.PageContext.getPhaseId(PageContext.java:153)
at org.jboss.seam.contexts.PageContext.isRenderResponsePhase(PageContext.java:165)
at org.jboss.seam.contexts.PageContext.getCurrentReadableMap(PageContext.java:76)
My code is as follows:
<h:commandButton id="addBtn"
value="Q-Refresh"
type="button"
onclick="q_refreshTable('ledgerForm:tranTable', null, 'ledgerAction.fetchLedgerTransactions'); "></h:commandButton>
<q:dataTable id="tranTable" var="tran" value="#{ledgerAction.ledgerTransactions}"
Where 'ledgerAction.fetchLedgerTransactions' simply populates the ledgerAction.ledgerTransactions Object.
Obviously from the error I am using Seam and My Faces
Any thoughts on this?
Thanks!
- Ralph
I was equally excited when saw the refresh table feature in the latest release. I quickly tried to use it but could not get it to work. How is it used exactly? I followed the instructions in your documentation. Please throw more light on its usage.
Thanks.
Jonathan Ekwempu
Enterprise Architect/Developer
TobiSoft LLC
Ralph,
In the current version of QuipuKit library, the DataTable and TreeTable components do not work with backing-beans in "conversational" scope. We are going to fix this in one of the future releases of QuipuKit.
Regards,
Tatyana
Jonathan,
Here is an example of using the "q_refreshTable" function with the second parameter specified:
<h:form id="form1">
<q:dataTable id="allPeople"
var="person"
value="#{PeopleList.person}">
<q:multipleRowSelection rowDatas="#{PeopleList.selectedRows}"></q:multipleRowSelection>
<q:column>
<f:facet name="header">
<h:outputText value="Name"></h:outputText>
</f:facet>
<h:outputText value="#{person.name}"></h:outputText>
</q:column>
</q:dataTable>
<h:commandButton value="Add selected people"
type="button"
onclick="q_refreshTable('form1:selectedPeople', ['form1:allPeople'], null); "></h:commandButton>
<q:dataTable id="selectedPeople"
var="selectedPeople"
value="#{PeopleList.selectedRows}">
<q:column>
<f:facet name="header">
<h:outputText value="Name"></h:outputText>
</f:facet>
<h:outputText value="#{selectedPeople.name}"></h:outputText>
</q:column>
</q:dataTable>
</h:form>
In this example, when the user clicks the "Add selected people" button, the "allPeople" table is submitted and the "selectedPeople" table is updated with selected rows from the "allPeople" table.
You can find more examples in our DataTable and TreeTable demo. You can download the source code of the demo application here
Regards,
Tatyana
Tatyana,
Thanks for getting back to me. I tried a similar example but could ONLY get the first row data in the first data table to display in the second table.
There were no javascript errors or any other errors I am aware of. As I select different rows in the table, only the first row table item is refreshed in the second table.
The same thing happened when I tried a single row selection on a data table with ajax4jsf support as shown in the code snippet below:
<q:singleRowSelection rowData="#{general.selectedGridData}" styleClass="gridSingleRowSelectionStyle" >
<a4j:support event="onchange" action="#{general.gridTableAction}" reRender="detailPanel"/>
</q:singleRowSelection>
Thanks.
Jonathan Ekwempu
Hello Jonathan,
Unfortunately, we cannot reproduce the problem you described. Could you please provide us with more information, such as:
- JSF implementation and version
- State saving method
- Application server.
It will be also helpful if you could send us a sample application on which we can reproduce the problem.
Regards,
Tatyana