1 of 1 people found this helpful
Well 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.
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:
If anyone has a better solution, I'm listening :]
what if a request takes longer than 500msec? ;-)
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