[
http://jira.jboss.com/jira/browse/RF-1771?page=all ]
Andrei Zaharov updated RF-1771:
-------------------------------
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;
}
}
//???????????!
was:
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.
a4j:jsFunction 'oncomplete' event does not work properly in
Opera
-----------------------------------------------------------------
Key: RF-1771
URL:
http://jira.jboss.com/jira/browse/RF-1771
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.3
Environment: Fedora 8, Opera 9.25
Reporter: Andrei Zaharov
Assigned To: Sergey Halipov
Fix For: 3.2.0
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;
}
}
//сновымгодом!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira