1 2 Previous Next 22 Replies Latest reply on Jan 8, 2008 9:31 AM by sergeyhalipov

    Need help with JSFunction

      This is no joke!

      Concerning to the example I described in
      http://jboss.com/index.html?module=bb&op=viewtopic&t=124919

      I have the following mysterious problem - I try to explain it as simple as I can:

      I use a jsFunction like this

      <a4j:jsFunction data="#{ctrl.json}" name="loadEditorData"
       oncomplete="setLoadedData(data);" />
      


      I call it in two cases:

      1.) on initial page loading with good old body onload="...". This works. the content of the editor is loaded.

      2.) oncomplete of an a4j:commandButton which is responsible to refresh the editor. Here the strange thing happens: The function is called (I checked with alert), but the getter of the bean specified in data is not called. So the returning JSON-String doesn't exist and my editor has nothing to draw.

      Before you ask: No strange things on a4j:log, no javascript errors, no output on tomcat console.

      By the way it works when I call the function for example on onclick event of the editor itself.

      Any ideas? Now, I'm even more interested in learning something about the inner structure of code generated and used by jsFunction (see again
      http://jboss.com/index.html?module=bb&op=viewtopic&t=124919)

      Thanks!


        1 2 Previous Next