-
1. Re: pageflow breaks ajax
damianharvey.damianharvey.gmail.com Mar 29, 2008 11:48 AM (in response to rohanmars)Show your page code containing the a4j:support tag.
Cheers,
Damian.
-
2. Re: pageflow breaks ajax
rohanmars Mar 29, 2008 7:26 PM (in response to rohanmars)basic page is:
<!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:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core" xmlns:rich="http://richfaces.ajax4jsf.org/rich" xmlns:a4j="http://richfaces.org/a4j"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> </head> <body> <h:form id="IndexForm"> <h:inputText value="#{signinAction.test}" size="35" maxlength="50" required="true" requiredMessage="#{msgs.REQUIRED_FIELD}" label="Amount" id="Amount"> <a4j:support event="onkeyup" eventsQueue="amount" requestDelay="1000" reRender="myvalue"/> </h:inputText> <h:outputText id="myvalue" value="value: #{signinAction.test}----"/> </h:form> </body> </html>
then use a page flow:
<?xml version="1.0"?> <pageflow-definition xmlns="http://jboss.com/products/seam/pageflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd" name="test"> <start-state name="start"> <transition to="test"/> </start-state> <page name="test" view-id="/main/test.xhtml"> <redirect/> <transition to="test"/> </page> </pageflow-definition>
backed by a bean:
@Stateful @Local(Signin.class) @Name("signinAction") @TransactionAttribute(TransactionAttributeType.SUPPORTS) @SuppressWarnings("unchecked") public class SigninAction implements Signin public String getTest() { return mValue; } public void setTest(String pvalue) { mValue = pvalue; } @Begin(pageflow="test", nested=true) public void testStart() {} }
and called from another page:
<h:commandLink action="#{signinAction.testStart}"> <h:outputText value="Test"/> </h:commandLink>
if you drectly access the page then all is okay, however if you access from pageflow then a full page refresh is done on each keyup.
additionally, I tried with the latest 2.1 snapshot and jbpm 3.2.2 with the same effect.
tried both client and server saving_state_method (s). also tried a4j regions and outputPanels.
Rohan
-
3. Re: pageflow breaks ajax
barbacena Mar 29, 2008 9:25 PM (in response to rohanmars)Try use the limitToList=true and ajaxSingle=true at a4j:support.
If it is a validation action you can also use bypassUpdates=false. -
4. Re: pageflow breaks ajax
barbacena Mar 29, 2008 9:26 PM (in response to rohanmars)Sorry, for validation is bypassUpdates=true.
-
5. Re: pageflow breaks ajax
pmuir Mar 30, 2008 12:15 AM (in response to rohanmars)I think I've heard of this before. Please create a bug in JIRA, and attach an example we can use to reproduce.
-
6. Re: pageflow breaks ajax
rohanmars May 29, 2008 8:05 AM (in response to rohanmars)FYI: Found the problem.
The problem was I the unamed transition in the page, like:
<page name="billercode" view-id="/bill/billerCode.xhtml"> <redirect/> <transition to="billercode"/>
Relic from my previous app version (not sure why I put these back in seam 1.x ...