a4j:poll updating table in which is a4j:commandLink is placed
pechnik Feb 8, 2011 1:11 PMI have such table.
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" |
| xmlns:h="http://java.sun.com/jsf/html" |
| xmlns:f="http://java.sun.com/jsf/core" |
| xmlns:ui="http://java.sun.com/jsf/facelets" |
| xmlns:a4j="http://richfaces.org/a4j" |
| xmlns:rich="http://richfaces.org/rich"> |
| <link rel="stylesheet" type="text/css" |
| href="${request.contextPath}/css.css" /> |
| <body> |
| <h:panelGroup> |
| <a4j:form eventsQueue="TradesFormQue"> |
| <a4j:poll limitToList="true" immediate="true" id="poll" interval="2000" |
| action="#{TradersSymbolStats.reload}" |
| reRender="myId,poll"/> |
| <rich:dataTable value="#{TradersSymbolStats.data}" var="repeater" id= "myId" align = "top" > |
| <rich:column style="text-align:right" width="150"> |
| <f:facet name="header"> |
| <h:outputText value="Currency" /> |
| </f:facet> |
| <a4j:commandLink eventsQueue="TradesFormLinkQue" value="#{repeater.name}" action = "CurrencyTrades" > |
| <f:setPropertyActionListener value="#{repeater.name}" |
| target="#{TradersSymbolStats.currency}"/> |
| </a4j:commandLink> |
| </rich:column> |
| <rich:column style="text-align:right" width="150"> |
| <f:facet name="header"> |
| <h:outputText value="Total Buy" /> |
| </f:facet> |
| <h:outputText value="#{repeater.buy}" style="text-align:right" > |
| <f:convertNumber type="number" groupingUsed="true" locale="en" /> |
| </h:outputText> |
| </rich:column> |
| </rich:dataTable> |
| </a4j:form> |
| </h:panelGroup> |
| </body> |
| </html> |
It is updated by a4j:poll to show some new information to user. When the user is clicking commandLink I need to redirect to another page. But it needs to click for about five to go to another page. When I removes a4j:poll every thing works fine. How it can be fixed with a4j:poll?