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

          Issue Links

            Activity

            Hide
            sergeyhalipov Sergey Halipov added a comment -

            Please, attach your JSP/XHTML code. It would help us to reproduce the problem.

            Show
            sergeyhalipov Sergey Halipov added a comment - Please, attach your JSP/XHTML code. It would help us to reproduce the problem.
            Hide
            sergeyhalipov Sergey Halipov added a comment -

            Happy New Year

            Show
            sergeyhalipov Sergey Halipov added a comment - Happy New Year
            Hide
            sergeyhalipov Sergey Halipov added a comment -

            Done in trunk. Committed revision 5048.

            Show
            sergeyhalipov Sergey Halipov added a comment - Done in trunk. Committed revision 5048.
            Hide
            ilya_shaikovsky Ilya Shaikovsky added a comment -

            to branch.

            resolve with 3.1.4 version to QA.

            Show
            ilya_shaikovsky Ilya Shaikovsky added a comment - to branch. resolve with 3.1.4 version to QA.
            Hide
            sergeyhalipov Sergey Halipov added a comment -

            Committed revision 5397.

            Show
            sergeyhalipov Sergey Halipov added a comment - Committed revision 5397.
            Hide
            sergeyhalipov Sergey Halipov added a comment -

            Please, do SVN update to test this issue. I've just commit some changes related to it.

            Show
            sergeyhalipov Sergey Halipov added a comment - Please, do SVN update to test this issue. I've just commit some changes related to it.
            Hide
            zaharov.andrei Andrei Zaharov added a comment -

            I try to build RichFaces from SVN by "mvn install", but get the fatal error while building manual (faq.pdf)

            [INFO] [jdocbook:resources]
            [INFO] [jdocbook:generate]
            [INFO] building formatting result [/home/dev/richfaces/docs/faq/en/target/docbook/pdf/faq.pdf]
            [INFO] ------------------------------------------------------------------------
            [ERROR] FATAL ERROR
            [INFO] ------------------------------------------------------------------------
            [INFO] Java heap space
            [INFO] ------------------------------------------------------------------------
            [INFO] Trace
            java.lang.OutOfMemoryError: Java heap space
            at com.icl.saxon.tinytree.TinyDocumentImpl.appendChars(TinyDocumentImpl.java:179)
            at com.icl.saxon.tinytree.TinyBuilder.characters(TinyBuilder.java:225)
            at com.icl.saxon.output.ProxyEmitter.characters(ProxyEmitter.java:101)
            at com.icl.saxon.om.Stripper.characters(Stripper.java:201)
            at com.icl.saxon.ContentEmitter.flush(ContentEmitter.java:220)
            at com.icl.saxon.ContentEmitter.endDocument(ContentEmitter.java:75)
            at com.icl.saxon.aelfred.SAXDriver.parse(SAXDriver.java:334)
            at com.icl.saxon.om.Builder.build(Builder.java:265)
            at com.icl.saxon.functions.Document.makeDoc(Document.java:228)
            at com.icl.saxon.functions.Document.getDocuments(Document.java:134)
            at com.icl.saxon.functions.Document.evaluate(Document.java:70)
            at com.icl.saxon.style.XSLGeneralVariable.getSelectValue(XSLGeneralVariable.java:251)
            at com.icl.saxon.style.XSLParam.process(XSLParam.java:72)
            at com.icl.saxon.style.XSLStyleSheet.process(XSLStyleSheet.java:626)
            at com.icl.saxon.Controller.transformDocument(Controller.java:1082)
            at com.icl.saxon.Controller.transform(Controller.java:953)
            at org.jboss.maven.plugins.jdocbook.gen.format.BasicFormatHandler.render(BasicFormatHandler.java:130)
            at org.jboss.maven.plugins.jdocbook.GenerationMojo.process(GenerationMojo.java:95)
            at org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.execute(AbstractDocBookMojo.java:207)
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

            How to increase the amount of memory for Java? Or I do something wrong?

            Show
            zaharov.andrei Andrei Zaharov added a comment - I try to build RichFaces from SVN by "mvn install", but get the fatal error while building manual (faq.pdf) [INFO] [jdocbook:resources] [INFO] [jdocbook:generate] [INFO] building formatting result [/home/dev/richfaces/docs/faq/en/target/docbook/pdf/faq.pdf] [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Java heap space [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.OutOfMemoryError: Java heap space at com.icl.saxon.tinytree.TinyDocumentImpl.appendChars(TinyDocumentImpl.java:179) at com.icl.saxon.tinytree.TinyBuilder.characters(TinyBuilder.java:225) at com.icl.saxon.output.ProxyEmitter.characters(ProxyEmitter.java:101) at com.icl.saxon.om.Stripper.characters(Stripper.java:201) at com.icl.saxon.ContentEmitter.flush(ContentEmitter.java:220) at com.icl.saxon.ContentEmitter.endDocument(ContentEmitter.java:75) at com.icl.saxon.aelfred.SAXDriver.parse(SAXDriver.java:334) at com.icl.saxon.om.Builder.build(Builder.java:265) at com.icl.saxon.functions.Document.makeDoc(Document.java:228) at com.icl.saxon.functions.Document.getDocuments(Document.java:134) at com.icl.saxon.functions.Document.evaluate(Document.java:70) at com.icl.saxon.style.XSLGeneralVariable.getSelectValue(XSLGeneralVariable.java:251) at com.icl.saxon.style.XSLParam.process(XSLParam.java:72) at com.icl.saxon.style.XSLStyleSheet.process(XSLStyleSheet.java:626) at com.icl.saxon.Controller.transformDocument(Controller.java:1082) at com.icl.saxon.Controller.transform(Controller.java:953) at org.jboss.maven.plugins.jdocbook.gen.format.BasicFormatHandler.render(BasicFormatHandler.java:130) at org.jboss.maven.plugins.jdocbook.GenerationMojo.process(GenerationMojo.java:95) at org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.execute(AbstractDocBookMojo.java:207) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) How to increase the amount of memory for Java? Or I do something wrong?
            Hide
            sergeyhalipov Sergey Halipov added a comment -

            You should set MAVEN_OPTS environment variable to provide additional parameters for JVM with maven. For example I've set this variable with following value:

            MAVEN_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=128m"

            See java -X for more details.

            Show
            sergeyhalipov Sergey Halipov added a comment - You should set MAVEN_OPTS environment variable to provide additional parameters for JVM with maven. For example I've set this variable with following value: MAVEN_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=128m" See java -X for more details.
            Hide
            zaharov.andrei Andrei Zaharov added a comment -

            test ok, bug fixed

            Show
            zaharov.andrei Andrei Zaharov added a comment - test ok, bug fixed

              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:

                  Development