voyent
Liferay Portal-ICEfaces Integration  XML
Forum Index -> Portals & Portlets Go to Page: Previous  1, 2, 3 Next 
Author Message
ngriffin7a


Joined: 04/Dec/2006 00:00:00
Messages: 40
Offline


This post contains a "Hello World" type of .WAR for use with Liferay-4.2.1.

NOTE#1: THE WEB-INF/lib FOLDER CONTAINS MY PATCHED, BINARY VERSIONS OF THE FOLLOWING .JARs:

- icefaces-comps.jar
- just-ice.jar

NOTE#2: YOU HAVE TO EXTRACT THE WAR, ADD SOME JAR FILES TO THE WEB-INF/lib FOLDER, AND RE-JAR-UP THE WAR BEFORE YOU CAN DEPLOY IT TO LIFERAY. SEE THE "README-NEED-MORE-JARS.TXT" FILE IN THE WEB-INF/lib FOLDER FOR MORE INFO.

The attached WAR contains two Portlets:
- ICEHelloWorldSunJSFPortletBridge
- SunHelloWorldSunJSFPortletBridge

As the name indicates, they are designed to work with the SUN (Not the Apache) JSF-Portlet Bridge, and the Sun JSF Reference Implementation (not MyFaces).

It is designed to show that ICEfaces portlets can live in the same portlet-war-webapp (and even render on the same page as) legacy/standard JSF portlets (of which I have many). Note that the com.icesoft.faces.delegateNonIface=true context-param must appear in the WEB-INF/web.xml file to enable this cohabitation.

Each portlet works with the VIEW/EDIT/HELP modes supported by the Sun JSF-Portlet Bridge.

Due to a lack of time, I wasn't prepared to include the following JARs in
this WEB-INF/lib folder. I am very concerned about licensing, and I didn't
have time to investigate all the open source distributable licenses for
these JARs. So instead, I leave it to the reader to track down these JARs
and put them in this WEB-INF/lib folder. Once that's done, you can zip
up the ICEHelloWorldSunJSFPortletBridge/ folder into a .WAR file, and
drop it in the Liferay hot deploy folder for deployment to Liferay.

The following JARs ship with ICEfaces-1.5.3, and so you can get them
from the binary distribution:

- backport-util-concurrent.jar
- commons-beanutils.jar
- commons-collections.jar
- commons-digester.jar
- commons-discovery.jar
- commons-el.jar
- commons-fileupload.jar
- commons-lang-2.1.jar
- commons-logging-api.jar
- commons-logging.jar
- el-api.jar
- jsf-api.jar
- jsf-impl.jar
- jstl.jar
- krysalis-jCharts-1.0.0-alpha-1.jar
- xml-apis.jar

The following Log4J file can be downloaded from: http://logging.apache.org/log4j/docs/index.html

- log4j-1.2.14.jar

And the following Sun-JSF-Portlet-Bridge file ships with Java Studio Creator 2, which can
be found here: http://developers.sun.com/prodtech/javatools/jscreator/downloads/index.jsp

- jsf-portlet.jar

Now, the one that I am using is 53,989 bytes in size. I do have a concern that the latest
release of Java Studio Creator 2 is shipping a jsf-portlet.jar that is built for use with
the Sun GlassFish server, and JSF 1.2. If this is the case, then the latest jsf-portlet.jar
that ships with Java Studio Creator 2 might not be the right one, or might not work.

Enjoy,

Neil Griffin
Triton Services, Inc.
 Filename ICEHelloWorldSunJSFPortletBridge.war [Disk] Download
 Description
 Filesize 1048 Kbytes
 Downloaded:  568 time(s)

Prasoon

Joined: 15/Feb/2007 00:00:00
Messages: 4
Offline


Hi Neil Griffin,
I am newbie to icefaces. I have a basic understanding of JSF,Liferay. We are in the process of using icefaces components along with jsf and making it as a portlet and deploying on to the liferay[which is been configured on JBOSS 4.0.4 with Lifeary's war version.]
I successfully able to run standalone icefaces, jsf application but when i am trying to make it as portlet i am getting these exceptions.


14:51:59,778 ERROR [PortletImpl] com.liferay.portal.NoSuchRoleException: No Role exists with the key {companyId=liferay.com,
14:52:05,153 ERROR [[TextFieldsPortlet]] Servlet.service() for servlet TextFieldsPortlet threw exception
java.lang.ClassCastException: com.sun.faces.portlet.ExternalContextImpl
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesPortlet.render(PersistentFacesPortlet.java:226)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:333)
at com.liferay.portlet.CachePortlet.render(CachePortlet.java:182)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:949)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:268)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1102)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1048)
at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:72)
at com.liferay.portal.action.UpdateLayoutAction.execute(UpdateLayoutAction.java:168)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:156)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:477)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:875)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:143)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:115)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
14:52:05,153 ERROR [jsp] java.lang.ClassCastException: com.sun.faces.portlet.ExternalContextImpl
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesPortlet.render(PersistentFacesPortlet.java:226)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:333)
at com.liferay.portlet.CachePortlet.render(CachePortlet.java:182)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:949)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:268)Code:

		




I also try to deploy war file given by you and copied all the mentioned jars in my lib folder.I am getting this exception



14:37:35,508 ERROR [PortletImpl] com.liferay.portal.NoSuchRoleException: No Role exists with the key {companyId=liferay.com, name=admin}
14:37:38,633 ERROR [PersistentFacesPortlet]
java.lang.NullPointerException
at net.sf.jsfcomp.chartcreator.ChartListener.afterPhase(ChartListener.java:44)
at com.sun.faces.portlet.LifecycleImpl.phase(LifecycleImpl.java:256)
at com.sun.faces.portlet.LifecycleImpl.execute(LifecycleImpl.java:156)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesPortlet.render(PersistentFacesPortlet.java:230)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:333)
at com.liferay.portlet.CachePortlet.render(CachePortlet.java:182)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:949)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:268)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1102)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1048)
at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:72)
at com.liferay.portal.action.UpdateLayoutAction.execute(UpdateLayoutAction.java:168)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:156)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:477)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:875)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:143)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:115)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)


Please help me in this regard..

Thanks in advance!!!

Prasoon
 Filename ICEHelloWorldSunJSFPortletBridge.war [Disk] Download
 Description Included all the jars in the lib folder mentioned by you.
 Filesize 4181 Kbytes
 Downloaded:  306 time(s)

ngriffin7a


Joined: 04/Dec/2006 00:00:00
Messages: 40
Offline


Prasoon,

I think I know what is causing the first error. The PersistentFacesPortlet is assuming that the ICEfaces ExternalContext is already loaded by the JSF lifecycle. Please check your faces-config.xml file, and make sure that the <faces-context-factory> element is present. In fact, please make sure that all of the following is present:

Code:
 <faces-config xmlns="http://java.sun.com/JSF/Configuration">
  <application>
   <view-handler>com.sun.faces.application.ViewHandlerImpl</view-handler> 
   </application>
  <application>
   <view-handler>com.icesoft.faces.application.D2DViewHandler</view-handler> 
   </application>
  <factory>
   <faces-context-factory>com.icesoft.faces.context.FacesContextFactoryImpl</faces-context-factory> 
   </factory>
   </faces-config>
 


Regarding your second error. I don't know. I think it may be caused if you are using one of the ICEfaces chart components. I am sorry but I did not have time to test the chart components. I was told by Ted Goddard of ICEsoft that they will be working on portlet support.

I recommend that you download the ICEsoft source code, build it, and see if you can figure out where the problem is.

Best Regards,

Neil
Prasoon

Joined: 15/Feb/2007 00:00:00
Messages: 4
Offline


Hi Neil,
thanks for your quick reply.Neil actually in my first problem i havent included any icefaces chart component i have just used icefaces sample textentry example(which is there on icefaces http://component-showcase.icefaces.org/component-showcase/).

this is my ice-faces-config.xml file:

<?xml version='1.0' encoding='UTF-8'?>


<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<!-- =========== FULL CONFIGURATION FILE ================================== -->

<faces-config>
<application>
<view-handler>com.sun.faces.application.ViewHandlerImpl</view-handler>
</application>
<application>
<view-handler>com.icesoft.faces.application.D2DViewHandler</view-handler>
</application>
<factory>
<faces-context-factory>com.icesoft.faces.context.FacesContextFactoryImpl</faces-context-factory>
</factory>
<managed-bean>
<managed-bean-name>textFields</managed-bean-name>
<managed-bean-class>bean.AutoCompleteBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>


and this is my web.xml file

<?xml version="1.0" encoding="UTF-8"?>
<web-app 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">
<context-param>
<param-name>company_id</param-name>
<param-value>liferay.com</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.debugDOMUpdate</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>com.icesoft.faces.delegateNonIface</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
<description>
State saving method: "client" or "server" (= default)
See JSF Specification 2.5.2
</description>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/ice-faces-config.xml</param-value>
</context-param>


<!-- concurrent DOM views -->
<context-param>
<param-name>com.icesoft.faces.concurrentDOMViews</param-name>
<param-value>false</param-value>
</context-param>
<!-- Asynchronous Updates -->
<context-param>
<param-name>com.icesoft.faces.synchronousUpdate</param-name>
<param-value>false</param-value>
</context-param>




<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Persistent Faces Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>

<servlet>
<servlet-name>Blocking Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>

<servlet>
<servlet-name>TextFieldsPortlet</servlet-name>
<servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
<init-param>
<param-name>portlet-class</param-name>
<param-value>com.icesoft.faces.webapp.xmlhttp.PersistentFacesPortlet</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<listener>
<listener-class>com.liferay.portal.kernel.servlet.PortletContextListener</listener-class>
</listener>
<listener>
<listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
</listener>
<servlet-mapping>
<servlet-name>TextFieldsPortlet</servlet-name>
<url-pattern>/TextFieldsPortlet/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.iface</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>Blocking Servlet</servlet-name>
<url-pattern>/block/*</url-pattern>
</servlet-mapping>


<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
</web-app>

and in my lib directory following are the jars:
backport-util-concurrent.jar
- commons-beanutils.jar
- commons-collections.jar
- commons-digester.jar
- commons-discovery.jar
- commons-el.jar
- commons-fileupload.jar
- commons-lang-2.1.jar
- commons-logging-api.jar
- commons-logging.jar
- el-api.jar
- jsf-api.jar
- jsf-impl.jar
- jstl.jar
- krysalis-jCharts-1.0.0-alpha-1.jar
- xml-apis.jar
-icefaces-comps.jar
-jsf-portlet.jar
-just-ice.jar
-krysalis-jCharts-1.0.0-alpha-1.jar
-log4j-1.2.14.jar
-portal-ejb.jar
-portal-kernel.jar
-portal-service.jar
-util-bridges.jar
-util-java.jar
-util-taglib.jar

and i am getting the following exceptions:
java.lang.NullPointerException
at net.sf.jsfcomp.chartcreator.ChartListener.afterPhase(ChartListener.java:44)
at com.sun.faces.portlet.LifecycleImpl.phase(LifecycleImpl.java:256)
at com.sun.faces.portlet.LifecycleImpl.execute(LifecycleImpl.java:156)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesPortlet.render(PersistentFacesPortlet.java:341)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:333)
at com.liferay.portlet.CachePortlet.render(CachePortlet.java:182)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:949)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:268)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:15
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1102)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1048)
at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:72)
at com.liferay.portal.action.UpdateLayoutAction.execute(UpdateLayoutAction.java:168)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:156)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:477)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:875)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:143)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:115)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:15
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BasePro
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)


One more thing which is seems to be important that i have a already one deployed portlet in liferay which refers to the chart creator jar file.
Is it so that my this portlet is refering to that jar file.and for only testing purpose i also removed chart creator jar file from that portlet then when i try to deploy my this portlet getting this exception:

java.lang.NullPointerException
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:498)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
at com.sun.faces.portlet.LifecycleImpl$RenderResponsePhase.execute(LifecycleImpl.java:540)
at com.sun.faces.portlet.LifecycleImpl.phase(LifecycleImpl.java:246)
at com.sun.faces.portlet.LifecycleImpl.render(LifecycleImpl.java:188)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesPortlet.render(PersistentFacesPortlet.java:342)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:333)
at com.liferay.portlet.CachePortlet.render(CachePortlet.java:182)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:949)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:268)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1102)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1048)
at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:72)
at com.liferay.portal.action.UpdateLayoutAction.execute(UpdateLayoutAction.java:168)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:156)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:477)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:875)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.strip.StripFilter.doFilter(StripFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:143)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:115)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:152)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)


please help me.

thanks & Regards
Prasoon

ngriffin7a


Joined: 04/Dec/2006 00:00:00
Messages: 40
Offline


Prasoon,

The java.lang.NullPointerException at net.sf.jsfcomp.chartcreator.ChartListener.afterPhase(ChartListener.java:44) is probably due to the "chart creator jar file" that you wrote about. It has a JSF "Phase Listener", which will listen to every single JSF lifecycle phase, for every single JSF webapp (portlet) that you have. The "chart creator jar file" probably has a META-INF/faces-config.xml file inside it, which has a <phase-listener> element. The JSF framework automatically looks for META-INF/faces-config.xml files inside of every .JAR in the WEB-INF/lib folder of a webapp. So that's why your ICEfaces portlet is running into trouble when you include the "chart creator jar file" in the other portlet.

In order to understand why the "char creator jar file" is throwing the NullPointerException, you are going to have to download the source code for it and check out line 44 of ChartListener.java. Sorry I can't help any further with that.

Now, it makes sense that the ChartListener.java exception goes away when you remove the "chart listener jar file." But now you are running into a java.lang.NullPointerException
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:498). Here is the offending code:

Code:
     protected void renderResponse(FacesContext context) throws IOException {
         UIComponent root = context.getViewRoot();
         String viewId = ((UIViewRoot) root).getViewId();
         ...
         if ((root.getChildCount() == 0) || (reloadInterval > -1)) {
             // We have not parsed the page yet;
             // Need an input stream for the page;
             if (viewId.startsWith("/faces")) {
 


The viewId.startsWith() call is throwing the NullPointerException. That means that the earlier call to getViewId() is returning a null value. I suppose this can happen if your portlet.xml file is not setup correctly. For example, you might have an entry like this inside of portlet.xml

Code:
 <init-param>
   <name>com.sun.faces.portlet.INIT_VIEW</name> 
   <value>/MyPage.iface</value> 
 </init-param>
 


But perhaps there is a typo in the <value> entry? Or perhaps your fileName is not MyPage.jspx in the filesystem. These are just guesses.

By the way, are you using Facelets as your view handler? If you are, then you will need this in your faces-config.xml file:

Code:
 <application>
   <view-handler>com.icesoft.faces.facelets.D2DFaceletViewHandler</view-handler> 
 </application>
 


Note that my example portlet does not use Facelets. It uses standard .JSPX syntax. Also, it only uses <f:> and <ice:> parameters -- it does not uses standard HTML tags like <html>, <body>, etc.. because I have just-ice.jar in the WEB-INF/lib folder (and not icefaces.jar). This is because I need DelegateNonIface=TRUE in the web.xml file. So if your WEB-INF/lib folder has just-ice.jar and not icefaces.jar, then you can't use standard html tags. See: http://www.icefaces.org/docs/v1_5_1/htmlguide/devguide/keyConcepts12.html

Best Regards,

Neil
Prasoon

Joined: 15/Feb/2007 00:00:00
Messages: 4
Offline


Hi Neil,
sorry for the late response.I have still issues with the icefaces and liferay.
I am not using facelets in my application.
I am attaching my web application can you please check the source code and let me know if some changes are required, this will be a great help from you and also a learning experience for me.
Please let me know my mistakes.

Thanks & Regards
Prasoon
 Filename IceApplication.rar [Disk] Download
 Description
 Filesize 23205 Kbytes
 Downloaded:  72 time(s)

marios

Joined: 01/Mar/2007 00:00:00
Messages: 4
Offline


Hello, I have a question regarding JSF portlet and ICEFaces Integration.

I have a portlet (Liferay portlet actually) in JSF created by Java Studio Creator. I want to add only a page that uses ICEFaces inputFile component without messing with the rest pages. Is that possible? The developers Guide has a paragraph in page 17, "JSF Integration" that mentions this can be done, but the configurations that need to be done are not clear to me

Can you give me some hints?

Marios
ngriffin7a


Joined: 04/Dec/2006 00:00:00
Messages: 40
Offline


Prasoon,

Sorry for the delay -- I am super busy at work. I downloaded the .RAR file you posted but can't seem to extract it with the "jar xf" command. Can you please send it as a JAR/ZIP archive?

Thanks,

Neil

ngriffin7a


Joined: 04/Dec/2006 00:00:00
Messages: 40
Offline


Marios,

I *think* it might be possible, but I don't know for sure. First of all, you need to decide if you are going to use icefaces.jar or just-ice.jar. When you use icefaces.jar, then all the standard components like <h:inputText> will be ICE-Ajaxified, and can't be mixed with other JSF component libraries (like Java Studio Creator, Tomahawk) on the same page.

Even though you are keeping your Java Studio Creator (JSC) pages separate from your ICEfaces fileUpload page, **my recommendation** is that you try just-ice.jar instead of icefaces.jar.

Now, in your faces-config.xml file, you will need to try some interesting stuff. Your navigation rules will need to specify view Ids that are handled by different view handlers. For example:

<faces-config>
<navigation-rule>
<from-view-id>MyNonIcePage.jsp</from-view-id>
<navigation-case>
<to-view-id>MyIceFileUploadPage.iface</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

I think you will also have to put the com.icesoft.faces.delegateNonIface=true context-param in your WEB-INF/web.xml file to instruct the D2DViewHandler to delegate non-ICEfaces type pages to another view handler.

Good luck,

Neil
marios

Joined: 01/Mar/2007 00:00:00
Messages: 4
Offline


Hello Neil,

I tried to connect two pages, one in JSF and one in ICE in the same portlet. However only one works, and that seems to depend on whether I use

<portlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesPortlet</portlet-class>

where the ICE page works, or

<portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>

where the JSF page works.

Is there any way I can have both of them in the same portlet and say which pages will use which class?

Marios

Marios
ngriffin7a


Joined: 04/Dec/2006 00:00:00
Messages: 40
Offline


Marios,

You should be able to use:

portlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesPortlet</portlet-class>

And have your portlet <navigation-case> between .jspx(ICEfaces) and .jsp (Non-ICEfaces) pages. This is because the delegateNonIface option instructs the D2DViewHandler to delegate view-id's other than .jspx to other registered view handlers (like the Sun JSF Reference Implementation View Handler).

So if this doesn't work, then I would create an issue/bug in JIRA:
http://jira.icefaces.org/secure/Dashboard.jspa
Telpochyaotl

Joined: 23/Apr/2007 00:00:00
Messages: 21
Offline


Hi!

We are starting a pretty big project using liferay... I would very much love to use IceFaces in my portlets...

What's the stage of integration? What's the roadmap?

Thanks in advance!
anmu

Joined: 16/Apr/2007 00:00:00
Messages: 3
Offline


Hi all,

has anybody made the component showcase work in a portlet? Is this possible with ICEfaces 1.6?
jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


Just a little update on our progress.

As you might have noticed we have released ICEfaces 1.6.0-DR#3 last week. This gave us the chance to commit our preliminary Portlet-support work into the trunk. Our nightly builds can now be used to exercise ICEfaces Portlets.

ICEfaces Portlets must be configured to use our own custom MainPortlet (com.icesoft.faces.webapp.http.portlet.MainPortlet). In the case of the Liferay Portal, something like the following needs to be added to web.xml and portlet.xml respectively:

  • web.xml
    Code:
    <servlet>
         <servlet-name>timezone5</servlet-name>
         <servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
         <init-param>
             <param-name>portlet-class</param-name>
             <param-value>com.icesoft.faces.webapp.http.portlet.MainPortlet</param-value>
         </init-param>
         <load-on-startup>0</load-on-startup>
     </servlet>

  • portlet.xml
    Code:
    <portlet-class>com.icesoft.faces.webapp.http.portlet.MainPortlet</portlet-class>

    To define the initial view something like the following needs to be added to the portlet.xml:

  • portlet.xml
    Code:
    <init-param>
         <name>com.icesoft.faces.VIEW</name>
         <value>/timezone.iface</value>
     </init-param>

    The JSF Portlet Bridge must not be used. It attempts to install it's own ViewHandler and such which interferes with ICEfaces' own. In fact anything that has it's own ViewHandler or other similar mechanisms should be examined to ensure they interact nicely with the ICEfaces framework.

    JavaScript collisions and its related problems is the most serious issue we are currently trying to address. In the case of Liferay it has JavaScript applied to the page that allows to do things like visually re-arrange individual Portlets by dragging. Adding an ICEfaces Portlet in the mix currently causes this feature to break. Another JavaScript collision occurs when attempting to run multiple ICEfaces Portlets on one page. Each ICEfaces Portlet tries to load its own copy of the JavaScript Bridge with its own configuration, which conflict.

    Other issues to be taken into account are:

    Getting Resources in Component Renderers
    Neil originally provided some patches for the 1.5 branch to properly locate external resources like images used for buttons. We have included the same logic for our ButtonRenderer for the time being, but we have to do a more thorough review of our renderers.

    Portlet vs. ICEfaces Themes
    Neil also logged an issue (and a potential strategy for fixing it) with a conflict between how a portal theme is applied and how it can conflict with our standard ICEfaces themes.

    However, it is currently possible to deploy an ICEfaces Portlet to Liferay on Tomcat or Jetty. We have been successful in porting our TimeZone tutorial examples into a Portlet

    Please refer to our main JIRA case ICE-147 at http://jira.icefaces.org/browse/ICE-1478 for more information.

    Regards,

  • Jack van Ooststroom
    Senior Developer
    ICEsoft Technologies, Inc.
    [Email]
    anmu

    Joined: 16/Apr/2007 00:00:00
    Messages: 3
    Offline


    Hi Jack,

    thanks for this information: I have installed todays build of ICEfaces 1.6.0 and followed your instruction to make the timezone 5 tutorial example run in a portlet:
    I always get the following Exception:

    SEVERE: Servlet.service() for servlet ICEfacesTimezonePortlet threw exception
    java.lang.NullPointerException
    at com.icesoft.faces.webapp.http.portlet.MainPortlet.render(MainPortlet.java:93)
    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
    at com.liferay.portlet.CachePortlet._invoke(CachePortlet.java:333)
    at com.liferay.portlet.CachePortlet.render(CachePortlet.java:182)
    at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:692)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

    I also get the same Exception if I try to run the showcase in a portlet. Could you comment on this problem or provide your portlet war file for the timezone examples?

    Best regards
    Andreas
     
    Forum Index -> Portals & Portlets Go to Page: Previous  1, 2, 3 Next 
    Go to:   
    Powered by JForum 2.1.7ice © JForum Team