6 Replies Latest reply on Jun 18, 2007 2:11 PM by raidermike99

    A4J is not defined

    grit

      hello,

      i am working on a big project with JSF and A4J. Somehow the A4J component randomly decided to stop working until i reboot the tomcat server. It works the first few times i request the file directly (a4j.res/org.ajax4jsf.framework.ajax.AjaxScript.jsf), but then it just returns an empty page.

      Is there anybody who knows what i am doing wrong here? I should also mention im not really responsible for this at the project, but its annoying me more than it is others. My JSF knowledge is somewhat limited.

        • 1. Re: A4J is not defined

          What the version of Ajax4jsf you use?

          • 2. Re: A4J is not defined
            grit

            1.0.4 or 1.0.5, both of them are in the lib directory. Also, i have quickly tested it a bit more, and found that it only returns a javascript on the first request. After that, its just empty. This is with FF cache disabled, so it will always ask for a new version.

            • 3. Re: A4J is not defined

              Your version is too old. The problem with truncated js file in FF was solved later. The current version is 1.1.1. Download from here - http://repository.jboss.com/maven2/org/ajax4jsf/ajax4jsf/1.1.1/

              • 4. Re: A4J is not defined
                grit

                Does it also work for IE? i cant test it till after the weekend, but if it does work, thanks for the advice.

                • 5. Re: A4J is not defined
                  raidermike99

                  I am also getting the A4J not defined. For some reason the
                  java script include files are not getting generated when the page comes
                  up. I am using version 1.1.0

                  here is the generated page




                  Ajax4JsfJsp
                  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">










                  <input id="form1:text1" type="text" name="form1:text1" class="inputText" onkeyup="A4J.AJAX.Submit('_viewRoot','form1',event,{'parameters':{'form1:_id0':'form1:_id0'},'actionUrl':'/test_ajax4jsf/Ajax4JsfJsp.faces'})" />





                  • 6. Re: A4J is not defined
                    raidermike99


                    I found my own answer

                    http://www.jsfcentral.com/listings/P11140?link

                    "raidermike99" wrote:
                    I am also getting the A4J not defined. For some reason the
                    java script include files are not getting generated when the page comes
                    up. I am using version 1.1.0

                    here is the generated page


                    <html>
                    <head>
                    <title>Ajax4JsfJsp</title>
                    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
                    <meta name="GENERATOR" content="Rational Application Developer">
                    <link rel="stylesheet" type="text/css" href="theme/stylesheet.css"
                    title="Style">
                    </head>

                    <body>

                    <form id="form1" method="post" action="/test_ajax4jsf/Ajax4JsfJsp.faces" class="form" enctype="application/x-www-form-urlencoded">



                    <input id="form1:text1" type="text" name="form1:text1" class="inputText" onkeyup="A4J.AJAX.Submit('_viewRoot','form1',event,{'parameters':{'form1:_id0':'form1:_id0'},'actionUrl':'/test_ajax4jsf/Ajax4JsfJsp.faces'})" />
                    <span id="form1:text2" class="outputText"></span>
                    <input type="hidden" name="form1" value="form1" /></form>


                    </body>