-
1. Re: How to add/bind "oncomplete" event to rich:datascroller using javascript/jQuery
mcmurdosound Oct 3, 2012 4:25 PM (in response to giuliano.rap)1 of 1 people found this helpfulWell I think that won't work since the "oncomplete" event is just a callback what richfaces (or a4j) calls after the rerendering / dom updating has been completed. If you take a look to an a4j:commandLink or any other element that supports the "oncomplete" event, you'll see that the callback handler is already included in the "onclick" function call. It can be modified in the backing bean in the same request.
It would be easier just to modify all your facelets.
----
or you use a queue / status. But this has to be applied to each datascroller / table as well.
-
2. Re: How to add/bind "oncomplete" event to rich:datascroller using javascript/jQuery
giuliano.rap Oct 10, 2012 8:58 AM (in response to mcmurdosound)Thanks Christian!
Well, modify all the facelets would be easier but too much work, because the system has a lot of tables.
So what I did, which is not the best solution, is to bind my function on the click but setting a timeout, like this:
jQuery(table).bind('click', function(){setTimeout(function(){resizetable(id);},500)});If anyone has a better solution, I'm listening :]
Thanks!
-
3. Re: How to add/bind "oncomplete" event to rich:datascroller using javascript/jQuery
mcmurdosound Oct 10, 2012 1:53 PM (in response to giuliano.rap)what if a request takes longer than 500msec? ;-)
-
4. Re: How to add/bind "oncomplete" event to rich:datascroller using javascript/jQuery
giuliano.rap Oct 10, 2012 1:59 PM (in response to giuliano.rap)That's the problem :-)
But the most heavy tables are just a few and these ones use three templates, so I just changed the tables in the templates.
The other tables are not heavy, so I think it's ok. It's not the best solution haha