FAQ
Hi,
I build a test applicaton with ajaxAnywhere, and something is missing, I
don't know.

When I click on button, to ajaxed zone be refreshed, the "loading" label is
showed at top of the page, the backing methods is called(I see on the logs)
but when the "loading" label dissapear, nothing is putted on the ajaxed zone
=(. The ajaxed zone turn to void.

I follow al steps of this link too:
http://wiki.apache.org/myfaces/Integrating_Ajaxanywhere

this is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://ajaxanywhere.sourceforge.net/" prefix="aa"%>
<f:view >
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1252"/>
<script type="text/javascript" src="aa.js"></script>
<title>index</title>
</head>
<body>
<span id=cnt>0</span> seconds since last page refresh. <script>
var sec=0; function counter(){
setTimeout("counter();",1000);
document.getElementById("cnt").innerHTML = sec++;
}
counter();

</script>
<h:form id="main">
<p>
<h:commandButton value="commandButton1" id="botaoAjax"
actionListener="#{page_Index.action}"
action="null" />
</p>
<p>
<aa:zoneJSF id="ajaxZone">
<h:outputText value="#{page_Index.texto}" id="zonetorefresh"/>
</aa:zoneJSF>
</p>
</h:form><script type="text/javascript">
ajaxAnywhere.getZonesToReload = function(url, submitButton) {
if (typeof submitButton != 'undefined') {
if (submitButton.type == 'submit') {
if (submitButton.id.search('main:botaoAjax') != -1) {

return 'ajaxZone';
}
}
}
return null;
}
//var elements = new Array();
//elements.push(document.getElementById('main:botaoAjax'));
ajaxAnywhere.formName = 'main';
ajaxAnywhere.substituteFormSubmitFunction();
//ajaxAnywhere.substituteSubmitButtonsBehavior(true, elements);
ajaxAnywhere.substituteSubmitButtonsBehavior(true);
</script></body>
</html>
</f:view>
<%-- oracle-jdev-comment:preferred-managed-bean-name:page_Index--%>


this is my web.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
<description>Empty web.xml file for Web Application</description>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>AjaxAnywhere</filter-name>
<filter-class>org.ajaxanywhere.AAFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AjaxAnywhere</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>35</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
</web-app>

The ajax anywhere.jar is int the lib path too...and the aa.js was extracted
from the jar too.

Other question: There are other ajax framework to faces? is the ajaxAnywhere
the better free?

thanks a lot

Search Discussions

  • Rogerio Pereira at Apr 25, 2006 at 12:17 pm
    The MyFaces Ajax components set at sandbox.
  • Andrew Robinson at Apr 25, 2006 at 2:52 pm
    I get a blank replacement sometimes when the rendering fails on the
    server. Try to refresh the page (if you are using server side state
    saving) to render the page without AA. If there is an error during
    render, you will be able to see it there. Unfortunately AA usually
    swallows errors (the filter does not log them).

    I am having no issues with AA at the moment, so it should be working fine.
    On 4/25/06, Dudu wrote:
    Hi,
    I build a test applicaton with ajaxAnywhere, and something is missing, I
    don't know.

    When I click on button, to ajaxed zone be refreshed, the "loading" label is
    showed at top of the page, the backing methods is called(I see on the logs)
    but when the "loading" label dissapear, nothing is putted on the ajaxed zone
    =(. The ajaxed zone turn to void.

    I follow al steps of this link too:
    http://wiki.apache.org/myfaces/Integrating_Ajaxanywhere

    this is my code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri=" http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://ajaxanywhere.sourceforge.net/"
    prefix="aa"%>
    <f:view >
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <script type="text/javascript" src=" aa.js"></script>
    <title>index</title>
    </head>
    <body>
    <span id=cnt>0</span> seconds since last page refresh. <script>
    var sec=0; function counter(){
    setTimeout("counter();",1000);
    document.getElementById("cnt").innerHTML = sec++;
    }
    counter();

    </script>
    <h:form id="main">
    <p>
    <h:commandButton value="commandButton1" id="botaoAjax"

    actionListener="#{page_Index.action}" action="null" />
    </p>
    <p>
    <aa:zoneJSF id="ajaxZone">
    <h:outputText value="#{page_Index.texto}" id="zonetorefresh"/>
    </aa:zoneJSF>
    </p>
    </h:form><script type="text/javascript">
    ajaxAnywhere.getZonesToReload = function(url, submitButton) {
    if (typeof submitButton != 'undefined') {
    if (submitButton.type == 'submit') {
    if (submitButton.id.search('main:botaoAjax') != -1) {
    return 'ajaxZone';
    }
    }
    }
    return null;
    }
    //var elements = new Array();
    //elements.push(document.getElementById('main:botaoAjax'));
    ajaxAnywhere.formName = 'main';
    ajaxAnywhere.substituteFormSubmitFunction();
    //ajaxAnywhere.substituteSubmitButtonsBehavior(true,
    elements);
    ajaxAnywhere.substituteSubmitButtonsBehavior(true);
    </script></body>
    </html>
    </f:view>
    <%--
    oracle-jdev-comment:preferred-managed-bean-name:page_Index--%>


    this is my web.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <filter>
    <filter-name>AjaxAnywhere</filter-name>
    <filter-class>org.ajaxanywhere.AAFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>AjaxAnywhere</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    </web-app>

    The ajax anywhere.jar is int the lib path too...and the aa.js was extracted
    from the jar too.

    Other question: There are other ajax framework to faces? is the ajaxAnywhere
    the better free?

    thanks a lot
  • Rawan at Apr 29, 2006 at 5:20 pm
    hi,
    i tried to use ajaxanywhere but i always get the same error, which is
    content type is not xml any idea how to work it out?????
    --
    View this message in context: http://www.nabble.com/AjaxAnywhere%2C-almost-there%21-t1505066.html#a4156326
    Sent from the MyFaces - Users forum at Nabble.com.
  • Poczta.o2.pl at Apr 29, 2006 at 5:25 pm
  • Andrew Robinson at Apr 29, 2006 at 9:44 pm
    What version of AA are you using? I only can get 1.1.0.6 to work. 1.2
    always fails with that error for me.
    On 4/29/06, rawan wrote:

    hi,
    i tried to use ajaxanywhere but i always get the same error, which is
    content type is not xml any idea how to work it out?????
    --
    View this message in context: http://www.nabble.com/AjaxAnywhere%2C-almost-there%21-t1505066.html#a4156326
    Sent from the MyFaces - Users forum at Nabble.com.
  • Rawan at Apr 30, 2006 at 6:37 am
    i use 1.2
    --
    View this message in context: http://www.nabble.com/AjaxAnywhere%2C-almost-there%21-t1505066.html#a4161703
    Sent from the MyFaces - Users forum at Nabble.com.
  • Andrew Robinson at Apr 30, 2006 at 7:12 pm
    I wouldn't use 1.2, it doesn't seem to work at all, at least not with
    myfaces & facelets.
    On 4/30/06, rawan wrote:

    i use 1.2
    --
    View this message in context: http://www.nabble.com/AjaxAnywhere%2C-almost-there%21-t1505066.html#a4161703
    Sent from the MyFaces - Users forum at Nabble.com.
  • Sanjiv Jivan at May 1, 2006 at 8:52 am
    I'm using AjaxAnywhere 1.2 with MyFaces/Facelets and things work fine. Can
    you make sure that you're not using an older version of aa.js with the newer
    AjaxAnywhere jars. (try clearing the browser cache as well).

    Andrew, are you seeing any errors with AA 1.2? Have you tried the CVS
    version.

    Rawan, please create an AjaxAnywhere issue and attach a sample war which
    illustrates the problem.

    Thanks,
    Sanjiv

    On 4/30/06, Andrew Robinson wrote:

    I wouldn't use 1.2, it doesn't seem to work at all, at least not with
    myfaces & facelets.
    On 4/30/06, rawan wrote:

    i use 1.2
    --
    View this message in context:
    http://www.nabble.com/AjaxAnywhere%2C-almost-there%21-t1505066.html#a4161703
    Sent from the MyFaces - Users forum at Nabble.com.
  • Andrew Robinson at May 1, 2006 at 2:52 pm
    Since 1.1.0.6 is working for me, I probably won't be upgrading any
    time soon (at least until after our release), but I will let you know
    if I have issues when I do try to upgrade later.

    Thanks,
    Andrew
    On 5/1/06, Sanjiv Jivan wrote:

    I'm using AjaxAnywhere 1.2 with MyFaces/Facelets and things work fine. Can
    you make sure that you're not using an older version of aa.js with the newer
    AjaxAnywhere jars. (try clearing the browser cache as well).

    Andrew, are you seeing any errors with AA 1.2? Have you tried the CVS
    version.

    Rawan, please create an AjaxAnywhere issue and attach a sample war which
    illustrates the problem.

    Thanks,

    Sanjiv


    On 4/30/06, Andrew Robinson wrote:
    I wouldn't use 1.2, it doesn't seem to work at all, at least not with
    myfaces & facelets.
    On 4/30/06, rawan wrote:

    i use 1.2
    --
    View this message in context:
    http://www.nabble.com/AjaxAnywhere%2C-almost-there%21-t1505066.html#a4161703
    Sent from the MyFaces - Users forum at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmyfaces
postedApr 25, '06 at 12:11p
activeMay 1, '06 at 2:52p
posts10
users6
websitemyfaces.apache.org

People

Translate

site design / logo © 2019 Grokbase