I can't get my ajax code to work properly, can anyone help me with this? The ajax call goes to the server correctly, so my code executes. But the html page doesn't update anything. Only when I do a manual refresh does the updated data display!
My flow code:
PaymenListService.test just adds + 1 to the int everytime (this works correctly when pressing the button).Code:<input name="testar" type="int" /> <view-state id="compareResultt"> <on-entry> <set name="testar" value="0" /> </on-entry> <transition on="search"> <set name="testar" value="paymentListService.test(flowScope.testar)" /> </transition> </view-state>
My xhtml. I have one regular commandButton and one primefaces commandbutton. Neither works.
I have Spring MVC 3.2, Web Flow 2.3.1, myfaces 2.1 and primefaces 3.4.2. I am using Websphere 7.Code:<!DOCTYPE html> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui" template="/WEB-INF/layouts/standard.xhtml"> <ui:define name="content"> Hello!!! <h:form id="myform"> <p:commandButton id="cancel" value="Cancel" action="search" update="@form"/> <h:commandButton id="search" action="search" value="OK"><f:ajax render="testText" /></h:commandButton> <h:outputText id="testText" value="#{testar}"></h:outputText> </h:form> </ui:define> </ui:composition>
Seems wierd that this simple example doesn't work?


Reply With Quote
