Combination View Flat View Tree View
Threads [ Previous | Next ]
Fateh Alchhabi
Icefaces Portlet Commandlink Response Very Slowly
January 30, 2013 2:11 AM
Answer

Fateh Alchhabi

Rank: Junior Member

Posts: 58

Join Date: December 1, 2010

Recent Posts

Hi All
I build Icefaces portlet For saving teachers courses in database and teacher can attached with the Course Some files(pdf,doc ...etc) and thoses files stores in the Document library
this portlet contains command-link to swtich between the courses
So if i click on the course link the portlet will refresh to view the course content and its attachment files
my problem is when i click this link its take Long time to update around 10to 20seconds
in my xhtml File i use this code

<div class="useful_links">
<ul>
<ui:repeat value="#{courseLibraryViewBean.courses}" var="course">
<li>
<h:commandLink value="#{course.courseCode}" action="#{courseLibraryViewBean.onChangeCourse}">
<f:setPropertyActionListener value="#{course}" target="#{courseLibraryViewBean.currentEntity}" />
</h:commandLink>
</li>
</ui:repeat>
</ul>
</div>

i use in my managed bean @SessionScoped

in liferay-portlet.xml i add this attributes
<portlet>
<portlet-name>500</portlet-name>
<instanceable>true</instanceable>
<render-weight>3</render-weight>
<ajaxable>false</ajaxable>
</portlet>

in faces-config.xml i disable all the listener like
com.liferay.faces.util.lifecycle.DebugPhaseListener
com.liferay.faces.util.lifecycle.ViewScopePhaseListener

in web.xml all the same like in demo portlets
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
</context-param>
<context-param>
<param-name>org.icefaces.uniqueResourceURLs</param-name>
<param-value>false</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-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
</web-app>

Some times it take too long o change the couse so the session is lost and error message from iceface come-up "Network Connection Interrrupted"
Itry to use primefaces but same problem still Exist
any idea r help in this case

thanks in advances