Hi,
I am using a4j 1.1.0 and sitemesh 2.4.1 with JSF. My code for the page is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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="
https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
<html>
<head>
</head>
<body>
<f:view>
<h:form id="form">
<h:outputText id="phid" value="#{msg.msg_id}"/>
<h:inputText id="phoneid" value="#{mybean.Id}">
<a4j:support event="onblur" action="#{mybean.getId}" reRender="out1" oncomplete="javascript:submit();"/>
</h:inputText>
<h:outputText id="out1" value="#{mybean.idMsg}" style="color:red;font-family: Arial, Geneva, Helvetica, sans-serif; font-size: 12px;"/>
</h:form>
</f:view>
</body>
</html>
I am including this page in the sitemesh decorator page.
and for the web.xml is:
<web-app>
........................
........................
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
...................
...................
</web-app>
Unfortunately, I got a javascript error as:
Error : A4J is undefined
But the same thing is working properly if I used with tiles.
The problem is due to the fact that it is not importing some auto generated javascript file e.g., <script type="text/javascript" src="../js/AJAX.js"></script> which is available in a4j.jar file.
Please anybody help me to fix this issue.
Thanks,
Ingoba