How to call a Javascript function for rendering in JSF 1.2 / Richfaces 3.3?

We have a4j:outputPanelthat ajaxRendered. Is there a way to call the javascript function every time it is (re) displayed? I know that we could put a call into every element that could be sent using oncomplete, but this is really almost impossible.

More details:

  • Jsf 1.2
  • Richfaces 3.3

Example (oncomplete is not actually available in the outputPanel tag):

<a4j:outputPanel ajaxRendered="true" oncomplete="myJSFunc()">
    <h:outputText value="Test-aroo" />
</a4j:outputPanel>
<!-- other inputs, buttons and stuff -->

Refresh Can the jQuery library be able to help (it is built into RichFaces)? I am looking at using .live () to register for an incomplete event. I will continue to experiment and update with progress.

jQuery, , myJSFunc(), .

+5
2

, javascript script outputPanel:

<a4j:outputPanel ajaxRendered="true">
    <h:outputText value="Test-aroo" />
    <script type="text/javascript">myJSFunc();</script>
</a4j:outputPanel>
+8

oncomplete , Ajax. a4j: outputPanel oncomplete.

0

All Articles