voyent
Problem converting an ICEfaces webapp into a Liferay portlet  XML
Forum Index -> Portals & Portlets
Author Message
afbustag

Joined: 18/Mar/2010 00:00:00
Messages: 5
Offline


Hi everyone!

I've developed a dynamic navigation menu for a website using an ICEfaces Tree component (v.1.8.2) and now I'm trying to convert it into a portlet app to be deployed on Liferay (v.5.2.3). I've created the portlet descriptor (portlet.xml), the Liferay configuration files (liferay-portlet.xml and liferay-display.xml) and also I wrapped my web content using the <ice:portlet> tag. The problem is that when I deploy the converted portlet into Liferay, it is showing an empty box, just the portlet frame and title, and no error is shown in the application server log. I'm deploying Liferay on a Glassfish server (v.2.1.1).

I appreciate any help. Thanks.

PS: Here are my configuration files:

web.xml

Code:
 <web-app>
     <context-param>
         <param-name>javax.faces.application.CONFIG_FILES</param-name>
         <param-value>/WEB-INF/faces-config.xml</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>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>com.icesoft.faces.concurrentDOMViews</param-name>
         <param-value>true</param-value>
     </context-param>
     <context-param>
         <param-name>com.icesoft.faces.synchronousUpdate</param-name>
         <param-value>true</param-value>
     </context-param>
     <listener>
         <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
     </listener>
     <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-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <url-pattern>*.jsf</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>
 </web-app>
 


faces-config.xml

Code:
 <faces-config>
     <application>
         <locale-config>
             <default-locale>es</default-locale>
             <supported-locale>en</supported-locale>
             <supported-locale>es</supported-locale>
         </locale-config>
     </application>
     <managed-bean>
         <description>
             Backing bean para menĂº del SUI
         </description>
         <managed-bean-name>menu</managed-bean-name>
         <managed-bean-class>
             sui.sitioWeb.gui.Menu
         </managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
     </managed-bean>
 </faces-config>
 


portlet.xml

Code:
 <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
              version="1.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
 
     <portlet>
         <portlet-name>menu_sui</portlet-name>
         <display-name>Menu SUI</display-name>
         <portlet-class>com.icesoft.faces.webapp.http.portlet.MainPortlet</portlet-class>
         <init-param>
             <name>com.icesoft.faces.portlet.viewPageURL</name>
             <value>/menu.iface</value>
         </init-param>
         <init-param>
             <name>com.icesoft.faces.portlet.editPageURL</name>
             <value>/editar_menu.iface</value>
         </init-param>
         
         <supports>
             <mime-type>text/html</mime-type>
             <portlet-mode>edit</portlet-mode>
         </supports>
         <portlet-info>
             <title>Menu SUI</title>
             <short-title>Menu SUI</short-title>
             <keywords>Menu SUI</keywords>
         </portlet-info>
     </portlet>
     
 </portlet-app>
 


liferay-portlet.xml

Code:
 <liferay-portlet-app>
     <portlet>
         <portlet-name>menu_sui</portlet-name>
         <instanceable>true</instanceable>
         <render-weight>1</render-weight>
         <ajaxable>false</ajaxable>
     </portlet>
     <role-mapper>
         <role-name>administrator</role-name>
         <role-link>Administrator</role-link>
     </role-mapper>
     <role-mapper>
         <role-name>guest</role-name>
         <role-link>Guest</role-link>
     </role-mapper>
     <role-mapper>
         <role-name>power-user</role-name>
         <role-link>Power User</role-link>
     </role-mapper>
     <role-mapper>
         <role-name>user</role-name>
         <role-link>User</role-link>
     </role-mapper>
 </liferay-portlet-app>
 


liferay-display.xml

Code:
 <display>
 	<category name="category.sui">
 		<portlet id="menu_sui" />
 	</category>
 </display>
 
afbustag

Joined: 18/Mar/2010 00:00:00
Messages: 5
Offline


Ok, I figured out the problem. I was inserting the <ice:portlet> tag before the <body> tag in the JSP page. It must be inside that tag to work. I was using the wrong example as a guide for this.

But... now I have another problem: the tree is not expanding/contracting at all. It's completely static now and I don't understand why.

Any ideas?
deryk.sinotte


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


You should also have this parameter in your web.xml:

Code:
     <context-param>
          <param-name>com.icesoft.faces.compressResources</param-name>
          <param-value>false</param-value>
      </context-param>


Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
afbustag

Joined: 18/Mar/2010 00:00:00
Messages: 5
Offline


Thanks. Now it works.
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team