a4j:include and a4j:poll interaction error - wrong navigatio
horako Oct 27, 2008 1:12 PMHi,
I have problem with navigation rules for <a4j:include> tag when it is on the same page as the <a4j:poll> tag. Sometimes it shows wrong content inside of the <a4j:include>. It only happens when I use <a4j:poll> for rerendering a different part of the page.
More details:
I have a page which contains:
1) order ticket (a small wizard - 3 steps - form -> confirmation -> result page). When an user confirms his order, it is entered into the order book (list of orders)
2) order book - contains all orders entered by the order ticket
How it is done
1) the order ticket is <aj4:include>
2) the order book is a simple table which is rerendered by <a4j:poll> tag every 1 sec.
What is wrong:
Sometimes (more often when the interval is shorter) the order ticket steps are in wrong order. e.g.: it goes from the result to the confirmation step. But my result action returns "form" which is mapped to the form.xhtml page.
When I use the ordet ticket wizard without the order book it works all fine.
I do not use any special thing like conversation scope or keepalive bean. I send all values all the time to the EVENT scope bean.
Has anybody had similar problems?
Thanks for help,
Ondrej
<ui:define name="main"> <!-- Order Ticket --> <rich:panel id="orderTicket" renderRegionOnly="true" styleClass="panelBottomMargin componentContainer" headerClass="panelHeaderThick" bodyClass="componentContainerBody" header="Order Ticket" rendered="#{!marketDetail.tradingContract.completed}"> <a4j:region id="wizard" renderRegionOnly="true" immediate="true"> <a4j:form eventsQueue="pollQueue"> <a4j:include viewId="/market/trading/interfaces/orderticket/form.xhtml"/> </a4j:form> </a4j:region> </rich:panel> <!-- POLL --> <a4j:region> <a4j:form> <a4j:poll interval="500" id="poll" name="poll" ajaxSingle="true" eventsQueue="pollQueue" reRender="orderBook, poll" limitToList="true"> <f:param name="contractId" value="#{orderticket.contractId}"/> </a4j:poll> </a4j:form> </a4j:region> <!-- Order Book --> <rich:panel id="orderBook" name="orderBook" styleClass="panelBottomMargin componentContainer" headerClass="panelHeaderThick" header="Order Book" bodyClass="componentContainerBody" rendered="#{!marketDetail.tradingContract.completed}"> <ui:include src="inc/orderbook.xhtml"/> </rich:panel> </ui:define>