Issue with richfaces
priya_ram Mar 31, 2009 5:13 AMHi there,
I have developed a sample web portal using
1)Oracle Weblogic portal 10.3
2)JSF-Myfaces 1.1.3
3)JSF 1.1
4)Richfaces 3.1.0
Issue: "onblur" event in the below code displays only the rendered output and the rest of the JSF elements will not get displayed. There seems to be an issue with merging of rendered output and un-rendered JSF elements. Could someone pls assist in resolving the issue?
The portal contains a JSF portlet with the following code-
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:view>
<h:form>
<t:outputLabel value="Account Number:"/>
<t:inputText value="#{registrationBean.accountNumber}">
<a4j:support action="#{registrationBean.validateAccountNumber}"
event="onblur" >
</a4j:support>
</t:inputText>
<t:outputText id="xyz" value="#{registrationBean.outMsg}"/>
<t:outputText value="" escape="false"/>
<t:outputLabel value="Mobile Number:"/>
<t:inputText value="#{registrationBean.mobileNumber}">
<a4j:support action="#{registrationBean.validateMobileNumber}"
event="onblur" ></a4j:support>
</t:inputText>
<t:outputText id="xyz1" value="#{registrationBean.outMobMsg}"/>
</h:form>
</f:view>
"web.xml" content
---------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" 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">
<display-name>tomahawkProject</display-name>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
<!--
State saving method: "client" or "server" (= default)
See JSF Specification 2.5.2
-->
</context-param>
<context-param>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
<!--
This parameter tells MyFaces if javascript code should be allowed in the
rendered HTML output.
If javascript is allowed, command_link anchors will have javascript code
that submits the corresponding form.
If javascript is not allowed, the state saving info and nested parameters
will be added as url parameters.
Default: "true"
-->
</context-param>
<context-param>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
<!--
If true, rendered HTML code will be formatted, so that it is "human readable".
i.e. additional line separators and whitespace will be written, that do not
influence the HTML code.
Default: "true"
-->
</context-param>
<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
<!--
If true, a javascript function will be rendered that is able to restore the
former vertical scroll on every request. Convenient feature if you have pages
with long lists and you do not want the browser page to always jump to the top
if you trigger a link or button action that stays on the same page.
Default: "false"
-->
</context-param>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>faces</servlet-name>
REQUEST
FORWARD
INCLUDE
</filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
<!--
Set the size limit for uploaded files. Format: 10 - 10
bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
-->
</init-param>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<servlet-name>faces</servlet-name>
REQUEST
FORWARD
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
REQUEST
FORWARD
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
REQUEST
FORWARD
</filter-mapping>
<!--Listener, that does all the startup work (configuration, init).-->
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
<servlet-name>faces</servlet-name>
<servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<filter-name>PageFlowJspFilter</filter-name>
<filter-class>org.apache.beehive.netui.pageflow.PageFlowJspFilter</filter-class>
<filter-name>PageFlowForbiddenFilter</filter-name>
<filter-class>org.apache.beehive.netui.pageflow.PageFlowForbiddenFilter</filter-class>
<init-param>
<param-name>response-code</param-name>
<param-value>404</param-value>
</init-param>
<filter-mapping>
<filter-name>PageFlowJspFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
FORWARD
REQUEST
INCLUDE
</filter-mapping>
<filter-mapping>
<filter-name>PageFlowJspFilter</filter-name>
<url-pattern>*.jspx</url-pattern>
FORWARD
REQUEST
INCLUDE
</filter-mapping>
<filter-mapping>
<filter-name>PageFlowForbiddenFilter</filter-name>
<url-pattern>*.java</url-pattern>
REQUEST
</filter-mapping>
<filter-mapping>
<filter-name>PageFlowForbiddenFilter</filter-name>
<url-pattern>*.jsfb</url-pattern>
REQUEST
</filter-mapping>
<filter-mapping>
<filter-name>PageFlowForbiddenFilter</filter-name>
<url-pattern>*.jpfs</url-pattern>
REQUEST
</filter-mapping>
<listener-class>org.apache.beehive.netui.pageflow.PageFlowContextListener</listener-class>
<listener-class>org.apache.beehive.netui.pageflow.HttpSessionMutexListener</listener-class>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.beehive.netui.pageflow.PageFlowActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/_pageflow/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
<servlet-name>XmlHttpRequestServlet</servlet-name>
<servlet-class>org.apache.beehive.netui.pageflow.xmlhttprequest.XmlHttpRequestServlet</servlet-class>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.jpf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>XmlHttpRequestServlet</servlet-name>
<url-pattern>*.xhr</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>XmlHttpRequestServlet</servlet-name>
<url-pattern>*.render</url-pattern>
</servlet-mapping>
<filter-name>PageFlowFacesFilter</filter-name>
<filter-class>org.apache.beehive.netui.pageflow.PageFlowFacesFilter</filter-class>
<filter-mapping>
<filter-name>PageFlowFacesFilter</filter-name>
<url-pattern>*.faces</url-pattern>
FORWARD
REQUEST
INCLUDE
</filter-mapping>
<filter-mapping>
<filter-name>PageFlowFacesFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
FORWARD
REQUEST
INCLUDE
</filter-mapping>
</web-app>