Hi there is a problem, you have to take the jsf.ajax post queue into
consideration, otherwise you might get parallel or out of order requests
considering that our http post is a queued asynchronous pattern.
Kind regards
Werner
On Mon, Sep 14, 2015 at 10:38 AM, Frank Caputo <frank_at_frankcaputo.de> wrote:
> Hi,
>
> here we go. I’ve done it with jQuery, because it’s really hard to change
> things in the jsf-javascript-library. I implemented jsf.ajax.get and
> jsf.ajax.render. Render simply uses get. I implemented get for simple
> navigation. The key is to handle the responses with jsf.ajax.response.
>
> jsf.ajax.get = function(userSettings) {
>     var settings = $.extend({
>         url:window.location.href,
>         headers:{
>             'Faces-Request':'partial/ajax'
>         },
>         cache:false,
>         error:function (data, textStatus, jqXHR) {
>             jsf.ajax.response(jqXHR, {formid:'none'});
>         },
>         beforeSend: function () {
>             // show a loader or whatever you want
>         },
>         success: function (data, textStatus, jqXHR) {
>             jsf.ajax.response(jqXHR, {formid:'none'});
>         }
>     }, userSettings);
>     $.ajax(settings);
> };
>
> jsf.ajax.render = function(ids, data) {
>     data = data || {};
>     data['javax.faces.partial.render'] = ids;
>     data['javax.faces.partial.ajax'] = true;
>     jsf.ajax.get('', {
>         type: 'POST',
>         data: data
>     });
> };
>
> Hope this is understandable.
>
> Ciao Frank
>
> Am 11.09.2015 um 22:21 schrieb Edward Burns <edward.burns_at_oracle.com>:
>
> On Fri, 11 Sep 2015 10:11:44 -0500, Josh Juneau <juneau001_at_gmail.com>
> said:
>
>
> JJ> +1, I'd also be interested in seeing your implementation.  Thanks
>
> Me too.
>
> --
> | edward.burns_at_oracle.com | office: +1 407 458 0017
> | 39 Business days til JavaOne 2015
> | 54 Business days til DOAG 2015
>
>
>