Hi there,
We're using Primefaces + Webflow and Im having some problem to get my Ajax-request go through Webflow.
I can make it work when using a p:commandButton but not with p:ajax. Should they not work the same or am I missing something?
I can make p:ajax "talk" to a backing-bean but since Im using Webflow my plan was that all service-calls should be handled by webflow. Is this possible?
Here's an example!
searchinput.xhtml:
flow.xml:Code:<p:panel id="searchPanel" header="Search customer"> CustomerIdfromTextInput: <h:inputText value="#{searchForm.customerIdfromTextInput}" /> <p:commandButton value="Fetch customer" action="flowCommandAction" update="customerInfoPanel"/> <br /> CustomerIdfromRadioInput: <h:selectOneRadio value="#{searchForm.customerIdfromRadioInput}" > <f:selectItem itemLabel="Customer 1" itemValue="1"/> <f:selectItem itemLabel="Customer 2" itemValue="2"/> <f:selectItem itemLabel="Customer 3" itemValue="3"/> <p:ajax action="flowRadioAction" update="customerInfoPanel"/> </h:selectOneRadio> </p:panel> <p:panel id="customerInfoPanel" header="Customer information"> Firstname: <h:outputText value="#{customer.firstName}"/><br/> Lastname: <h:outputText value="#{customer.lastName}"/><br/> CustomerId: <h:outputText value="#{customer.id}"/><br/> </p:panel>
When I'm clicking the "commandButton" the call is handled by webflow.. but when I click the radiobutton the call "is lost" on the server!Code:<view-state id="searchinput" model="searchForm"> <transition on="flowCommandAction"> <evaluate expression="customerService.getCustomer(searchForm.customerIdfromTextInput)" result="flowScope.customer"/> </transition> <transition on="flowRadioAction" validate="false"> <evaluate expression="customerService.getCustomer(searchForm.customerIdfromRadioInput)" result="flowScope.customer"/> </transition> </view-state>
We're using:
Primefaces 2.2.1
WebFlow 2.2.1
Spring 3.0.5
Mojarra 2.0.3 (SNAPSHOT 20100726)


Reply With Quote