Hi,
I am trying to use a4j and richfaces so I can render part of the page in response to an ajax call. I am able to render fragments using sf:commandLink, passing an action and using <render fragments=activeStateOutput/> in my transitions but I cannot acheive the same using A4J (I need this to support richfaces ajax functionality - i.e. rich:dataScroller).
Perhaps I am not correctly understanding the process but after I click on my a4j enabled link, the ajax call is made, the correct transition is called (using action=showActiveState) but the response coming back from the server contains nothing except an ajax redirect instruction. This causes the brower window to redirect to the url returned by the server.
Here is my transition
Here is my xhtml definitionCode:<transition on="showActiveState"> <evaluate expression="proposal.addPublication(null)"/> <render fragments="activeStateOutput"/> </transition>
Here is the generated javascript on my linkCode:<a4j:outputPanel id="activeStateOutput"> <div id="activeStateDiv"> <h:form id="activeStateForm"> <h:outputText value="#{proposal.activeState}"/> <h:inputText value="#{proposal.activeState}"/> <a4j:commandLink id="update" value="Update" reRender="#{flowRenderFragments}" action="showActiveState"/> </h:form> </div> </a4j:outputPanel>
Here is the response:Code:A4J.AJAX.Submit('_viewRoot','activeStateForm',event,{'similarityGroupingId':'activeStateForm:update','parameters':{'activeStateForm:update':'activeStateForm:update'} ,'actionUrl':'/duo/proposal/create?execution=e12s1'} );return false;
Is this the expected response?Code:<?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="Ajax-Response" content="redirect" /><meta name="Location" content="/duo/proposal/create?execution=e12s1" /></head></html>
I was hoping to be able to partially replace the page according to #{flowRenderFragments}. In this instance it should reRender activeStateOutput
I am using Richfaces 3.3.1 and webflow 2.0.7.


Reply With Quote
