HI,
I want to cancel the ajax dom update based on server side response.
How can I do it ?
I am using primefaces 2.2RC2
<p:ajax update="" listener="" />
if something goes wrong I want to stop updateing the components in the update=""
thank you.
cancel ajax update
Hi,
You can add update targets via RequestContext. Let "update" attribute not specified and define it in Java programmatically. Success ==> add regular update target (clientId of the component to be updated). Error ==> nothing to add.
You can add update targets via RequestContext. Let "update" attribute not specified and define it in Java programmatically. Success ==> add regular update target (clientId of the component to be updated). Error ==> nothing to add.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
I tried but it didnt work.
here is my code in jsf
<p:ajax process="senderPhone" listener="#{transactionController.senderDetailsListener}" event="blur" />
server code :
public void senderDetailsListener() {
RequestContext context = RequestContext.getCurrentInstance();
context.addPartialUpdateTarget("senderName");
context.addPartialUpdateTarget("senderAddress");
context.addPartialUpdateTarget("senderPostcode");
}
here is my code in jsf
<p:ajax process="senderPhone" listener="#{transactionController.senderDetailsListener}" event="blur" />
server code :
public void senderDetailsListener() {
RequestContext context = RequestContext.getCurrentInstance();
context.addPartialUpdateTarget("senderName");
context.addPartialUpdateTarget("senderAddress");
context.addPartialUpdateTarget("senderPostcode");
}
oh its working now.
I just add the form name wih the component id
like this
RequestContext context = RequestContext.getCurrentInstance();
context.addPartialUpdateTarget("myform:senderName");
context.addPartialUpdateTarget("myform:senderAddress");
context.addPartialUpdateTarget("myform:senderPostcode");
then it worked.
thank you guys
I just add the form name wih the component id
like this
RequestContext context = RequestContext.getCurrentInstance();
context.addPartialUpdateTarget("myform:senderName");
context.addPartialUpdateTarget("myform:senderAddress");
context.addPartialUpdateTarget("myform:senderPostcode");
then it worked.
thank you guys
-
- Information
-
Who is online
Users browsing this forum: No registered users and 55 guests