Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-1771

a4j:jsFunction 'oncomplete' event does not work properly in Opera

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1.4, 3.2.0
    • Fix Version/s: 3.1.4, 3.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Fedora 8, Opera 9.25

      Description

      It's impossible to use variable 'data' received from server using a4j:jsFunction ('oncomplete'). A4j log generates message: 'Error evaluate oncomplete function undefined'.
      It looks like what 'window.eval(newscript);' in function 'A4J.AJAX.finishRequest' doesn't execute in Opera cause variable 'data' defined in local context. But using 'eval(newscript);' instead 'window.eval(newscript);' works properly.

      JSP:
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <f:view>
      <html>
      <head>
      <title></title>
      </head>
      <body>
      <h:form>
      <a4j:jsFunction name="test" data="#

      {b1771.testj}

      " oncomplete="try

      {alert('a: '+data.a+', b: '+data.b);}

      catch(e)

      {alert('Error: '+e);}

      "/>
      <a href="javascript:test();">test</a>
      </h:form>
      </body>
      </html>
      </f:view>

      Java:
      package mrf;
      import java.util.*;
      public class b1771 {
      public Map getTestj()

      { Map m=new HashMap(); m.put("a",1); m.put("b",2); return m; }

      }

      //???????????!

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  nbelaevski Nick Belaevski
                  Reporter:
                  zaharov.andrei Andrei Zaharov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: