myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <werner.p...@gmail.com>
Subject Re: PPS ?
Date Tue, 03 Apr 2012 09:24:07 GMT
Btw. the standard ajax calls also have an oncomplete over their listeners.
You can register listeners globally or dynamically for a single call 
which shows you following phases:

begin... before the ajax request is issued
complete... after the ajax request has completed but before the response 
is issued
success... once everything has completed successfully

in case of an error an error handler can be set.


To register a listener you can use following ways:
jsf.ajax.addOnEvent(function(evt) {
	if(evt.status === "complete") {
		//do something here
	}
});
you also can do it for a single request

<f:ajax onevent="myeventHandler" onerror="myErrorHandler" />

As for our integrated queue control, you have read my blog regarding it :-)
It is of course not as extensive as the a4j queues.

Werner



Am 03.04.12 09:41, schrieb Michael Heinen:
> Thanks Werner for your quick repsonses.
> Good to know, that it's not compatible with a4j/richfaces.
>
> a4j contains some useful adons ( e.g. oncomplete for custom javascript
> calls after ajax calls, better queues, selfrendered outputpanels
> etcetc). It's too much effort at the moment to replace all ajax commands
> with standard components.
>
> Michael
>
>
> Am 03.04.2012 09:08, schrieb Werner Punz:
>> Ok that is the explanation.
>> Ajax4JSF introduces its own ajax lifecycle, it bypasses the standard
>> JSF Javascripts introduced with JSF 2.0. The question is more along
>> the lines, do you still need a4j or is the standard Ajax stuff enough.
>> The blog entries I wrote about pps and the no_portlet_env only adheres
>> to what MyFaces 2.x brings out of the box, I cannot speak about
>> extension frameworks there which run their own ajax lifecycle.
>>
>>
>> Werner
>>
>>
>> Am 02.04.12 16:18, schrieb Michael Heinen:
>>> Hi Werner,
>>>
>>> I tested various combinations with execute set to either @this or to
>>> @region.
>>> The usage of "myfaces.config.pps=true" does not result is less submitted
>>> fields (checked with Fiddler2).
>>> I use a4j:commandButtons (without children) for the submits.
>>>
>>> myfaces.config.pps is set in the document head on initial page load,
>>> right after "myfaces.config.no_portlet_env=true".
>>>
>>> Michael
>>>
>>
>>
>
>



Mime
View raw message