ajax - JSF 2 Scriptmanager style functionality -


I should be able to add some javascript to all AJAX postback responses (partialViewContext.isAjaxRequest == true), but I'm not I am successful with any implementation.

I have tried to apply a

  phase listener  

and partial response. Trying to add Eval Block, as well as creating a script element, trying to add the script. (The results can not be nested in CDATA, or just invalid XML can not be done)

I have attempted to override the partial visualontaxfafine to override

  partialViewContext.processPartial  

Add a script after wrapped example and it is processed ...

How should I go about adding sips in an Ajax response? Is there something similar with the same scriptmanager.registerClientScriptBlock

thanks

Use the Javascript library that comes bundled with your JSF2 implementation (as required by the imagery). API Docs:

jsf.ajax.addOnEvent fixes your problem of adding some javascript in your AJAX postback responses:

< Blockquote>

This function must accept the context of an existing javascript function. The reference to the JavaScript function should be added to the list of callback, so it is possible to register more than one callback by calling more than once jsf.ajax.addOnEvent more than once.


Comments