voyent
Messages posted by: nxMirko  XML
Profile for nxMirko -> Messages posted by nxMirko [4]
Author Message
Hi,
I for myself worked around this problem by doing the redirect actually using javascript.
Below are some code snippets I used.

My Backing Bean has the following code:

Code:
 ...
 private String redirectionUrl;
 
 public String getRedirectionUrl() {
 	return redirectionUrl;
 }
 
 public void doSomething() {
 	Map<String, Object> reqestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
 	ThemeDisplay themeDisplay = (ThemeDisplay) reqestMap.get("THEME_DISPLAY");
 	...
 	this.redirectionUrl = FacesContext.getCurrentInstance().getExternalContext().encodeResourceURL( themeDisplay.getPortalURL() + "/web/guest/page2");
 }
 


And in my Xhtml view definitions I wrote something like:

Code:
 ...
 <ice:commandButton 
 	action="#{bean.doSomething}" 
 	partialSubmit="false" 
 	value="Do something" />
 ...
 
 <script type="text/javascript">
 	if ('${bean.redirectionUrl}'!='')
 		window.location='${bean.redirectionUrl}';
 </script>
 


Hope that helps. Doing the redirect from inside the java code would of course be much nicer.

Kind regards
Mirko
Hello,
Recently I have been converting my Icefaces 1.8.2 portlets to Icefaces 2.0.0 to be used on Liferay 6.0.5.
Now during testing I encountered the following performance issue. Since my portal page contains quite a number of Icefaces portlets I wonder why each portlet instance has to load the required javascripts over and over again.

My request log shows e.g.:

Code:
 /web/guest/home?_PORTLET_ID1_javax.faces.resource=jsf.js&_PORTLET_ID1_ln=javax.faces&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_col_pos=1&p_p_id=PORTLET_ID1&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 /web/guest/home?_PORTLET_ID1_javax.faces.resource=bridge.js&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_col_pos=1&p_p_id=PORTLET_ID1&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 /web/guest/home?_PORTLET_ID1_javax.faces.resource=icepush.js&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_col_pos=1&p_p_id=PORTLET_ID1&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 /web/guest/home?_PORTLET_ID1_javax.faces.resource=compat.js&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_col_pos=1&p_p_id=PORTLET_ID1&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 /web/guest/home?_PORTLET_ID1_javax.faces.resource=icefaces-compat.js&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_col_pos=1&p_p_id=PORTLET_ID1&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 
 
 /web/guest/home?_PORTLET_ID2_javax.faces.resource=jsf.js&_PORTLET_ID2_ln=javax.faces&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_id=PORTLET_ID2&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 /web/guest/home?_PORTLET_ID2_javax.faces.resource=icepush.js&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_id=PORTLET_ID2&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 /web/guest/home?_PORTLET_ID2_javax.faces.resource=bridge.js&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_id=PORTLET_ID2&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 /web/guest/home?_PORTLET_ID2_javax.faces.resource=compat.js&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_id=PORTLET_ID2&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 /web/guest/home?_PORTLET_ID2_javax.faces.resource=icefaces-compat.js&p_p_cacheability=cacheLevelPage&p_p_col_count=6&p_p_col_id=column-2&p_p_id=PORTLET_ID2&p_p_lifecycle=2&p_p_mode=view&p_p_state=normal
 


My problem is now when the user comes to the website the first time, then the same javascript libraries have to get loaded for each portlet instance on that page. Even the browser cache does not help at that time. So the initial page request sums up to over 6MB size.
Subsequent page refreshes can then get the libraries from the browser cache.

I now wonder whether I miss some configuration parameter (jsf/icefaces or liferay) or another possible way to prevent this behavior.
I would rather like embedding these libraries once and for all statically.

I really appreciate any input on this.

Thanks in advance
Mirko

Hello,
Currently I'm trying to upgrade my various icefaces 1.8.2 portlets, that have been running on Liferay 5.2.3 to the new Icefaces version 2.0 and Liferay 6.0. During that I encounter a problem with user driven redirection.

What I want to do is e.g. having 2 portal pages defined in liferay (lets say Page1 and Page2). Both pages hold a different Icefaces portlet (e.g. Portlet1 and Portlet2). Now I want in my one portlet (1) to present a link (commandLink) that calls an action method on my BackingBean. Inside that action method I want the user to get redirected to portalPage 2.

Strangely I get the following StackTrace, when it comes to execution:

Code:
java.io.UnsupportedEncodingException: Unable to redirect during RESOURCE_PHASE (can only be done during ACTION_PHASE)
         at org.portletfaces.bridge.container.liferay.PortletContainerLiferayImpl.redirect(PortletContainerLiferayImpl.java:248)
         at org.portletfaces.bridge.context.ExternalContextImpl.redirect(ExternalContextImpl.java:382)
         at com.nx.TestBean.doRedirectionTest(TestBean.java:17)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.el.parser.AstValue.invoke(AstValue.java:191)
         at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
         at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:102)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         at javax.faces.component.UICommand.broadcast(UICommand.java:311)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:783)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1248)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
         at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:289)
         at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:173)
         at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:119)
         at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
         at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
         at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:635)
         at com.liferay.portlet.InvokerPortletImpl.invokeResource(InvokerPortletImpl.java:747)
         at com.liferay.portlet.InvokerPortletImpl.serveResource(InvokerPortletImpl.java:504)
         at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:847)
         at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:602)
         at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:229)
         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:152)
         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:637)
         at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:508)
         at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:485)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:309)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:137)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:182)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:254)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
         at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:133)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:309)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:137)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:182)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:221)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:440)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:45)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:254)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:81)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:179)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:239)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196)
         at com.liferay.portal.servlet.filters.threadlocal.ThreadLocalFilter.processFilter(ThreadLocalFilter.java:35)
         at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
         at java.lang.Thread.run(Thread.java:619)


Here is the code of my backing bean:

Code:
package com.nx;
 
 import java.io.IOException;
 import java.io.Serializable;
 
 import javax.faces.context.FacesContext;
 
 public class TestBean implements Serializable {
 
 	private static final long serialVersionUID = 1L;
 
 	public TestBean() {	}
 	
 	public String doRedirectionTest() {
 		String redirectUrl = "http://localhost:8080/web/guest/page2";
 		try {
 			FacesContext.getCurrentInstance().getExternalContext().redirect(FacesContext.getCurrentInstance().getExternalContext().encodeRedirectURL(redirectUrl, null));
 		} catch (IOException e) { e.printStackTrace(); }
 		return "";
 	}
 }


And my view looks like:

Code:
<html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ice="http://www.icesoft.com/icefaces/component"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       locale="en">
 
     <h:head/>
     <h:body>
 
        <ice:form>
        		<ice:outputText value="hello world"/>
        		<ice:commandLink action="#{testBean.doRedirectionTest}" value="Test redirection"/>
        </ice:form>
 
     </h:body>
 </html>


I am attaching the testPortlet source code in the hope someone can could explain, why this happens to me and what I can do to execute user driven redirects, as I was able in icefaces 1.8.2.

Thanks in advance
Best regards
Mirko
Hello,
I have the following situation. I develop a Portal having multiple IceFaces portlets deployed on a portal page. The various portlets share data using PortletSession and I'm using OnDemandRenderer to execute the server initiated rendering.
One of the portlets contains a auto-complete search mask.

The portlet alone works fine when it is the only icefaces portlet on the portal page. If I put more of my other portlets onto the page, the autocomplete input box still shows me the correct selectitems, but I have problems navigating them using the UP- and DOWN-keys. They are only selectable using the Mouse. Pressing ESCAPE does also not close my autocomplete list either - it closes for a short moment, but reappears pretty soon.

Strange thing is, that when I use JSF navigation to a second page (e.g. a portlet configuration screen) inside my portlet and then go back to my view with the autocomplete component is present, then the select items of the autocomplete are selectable using keyboard (UP and DOWN).

An reload of the whole portal page brings me back to the original problem.

Does anyone have a glue what might happen and can give me hints on howto investigate the problem?

I'm using IceFaces 1.8.2 together with Liferay 5.2.3.

Thanks in advance
Kind regards
Mirko
 
Profile for nxMirko -> Messages posted by nxMirko [4]
Go to:   
Powered by JForum 2.1.7ice © JForum Team