voyent
i have stuck in sample iceface portlet in liferay  XML
Forum Index -> Portals & Portlets
Author Message
tejash.patel

Joined: 27/Jun/2007 00:00:00
Messages: 3
Offline



Hi,

from last 3 days I have been trying to show icefaces jsf application as portlet in liferay 4.3.
For this I downloaded sample-icefaces-sun-portlet-4.3.0rc1.war from liferay download and deployed it into liferay 4.3 and add ice-faces-sun portlet through Add Content->Test->Sun Iceface-portlet.
It displays Job application form when I fill form and submit the form it doesn’t give any reply from server even it doesn’t give any error message.

anyone know how to solve it please reply me .

i am trying to make sample login demo.
if any one has it then please send me so i will figure out what is the stuck in my sample appliaction.



Telpochyaotl

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


what I've observed is that:

1 - if an IceFaces portlet is alone on the screen, seems to work, except I can't get the portlet artifacts (portlet request, etc) via the appropiate hack.
2 - If an IceFaces portlet is on the screen along with a MyFaces portlet, The MyFaces portlet stops working (no submits)
3 - If an iceFaces portlet is on the screen with a struts based portlet, the struts based portlet works, but IceFaces portlet will not submit anything, and the portlet artifacts strangely enough, become available...

Liferay has informed that they will reissue a sample portlet. I certainly hope this issue is fixed there... as in the current state, IceFaces is not usable in liferay.

I do appreciate all the hard work liferay and IceFaces teams have done to make this happen and I certainly wish for good integration soon!

Thanks!
pred


Joined: 09/Jul/2007 00:00:00
Messages: 87
Offline


It seems IceFaces Sample from Liferay is still using IceFaces 1.6RC#5, have you tried to put latest libraries from binarie package ?

- Stephane Maldini
Telpochyaotl

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


Yes... I replaced the libs in the sample portlet with what's in 1.6 final and sadly got the same results
jack.van.ooststroom


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


Hi,

First of all thanks for your interest in ICEfaces' Portlet integration. I have a couple of questions and suggestions:

1 - if an IceFaces portlet is alone on the screen, seems to work, except I can't get the portlet artifacts (portlet request, etc) via the appropiate hack. 

How are you trying to get the portlet artifacts? We are currently looking into how we can get the Portlet API available to the Portlet developers using ICEfaces, like PortletRequest, PortletResponse, PortletPreferences, PortletSession, etc..

2 - If an IceFaces portlet is on the screen along with a MyFaces portlet, The MyFaces portlet stops working (no submits) 

Did you try to clear the browser cache?

3 - If an iceFaces portlet is on the screen with a struts based portlet, the struts based portlet works, but IceFaces portlet will not submit anything, and the portlet artifacts strangely enough, become available... 

We haven't tried deploying an ICEfaces Portlet and a Struts based Portlet on one Portal page. We'll have to explore this scenario to see what the problem might be. However, getting the JSR-168 support complete is our priority for the moment.

Thanks for the appreciation of our combined effort. We are committed to get the full Portlet support into ICEfaces and to let ICEfaces Portlets run together on a Portal page with other technology based Portlets.

Regards,

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

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


Thanks a lot for the reply! I'll try to help as much as I can!

To your questions:

How are you trying to get the portlet artifacts? We are currently looking into how we can get the Portlet API available to the Portlet developers using ICEfaces, like PortletRequest, PortletResponse, PortletPreferences, PortletSession, etc..  


I'm using the PortletArtifactHack as can be seen here: http://jira.icefaces.org/browse/ICE-1625;jsessionid=2B939FF9615ED04DDFBD408A356CB78E

I have a method like this in a helper class:

public static PortletRequest getPortletRequest(){
Object request = FacesContext.getCurrentInstance().getExternalContext().getRequest();
// As a temporary means for IceFaces 1.6
if (request instanceof com.icesoft.faces.env.ServletEnvironmentRequest) {
PortletArtifactHack hack = (PortletArtifactHack)((HttpServletRequest)request).getAttribute(PortletArtifactHack.PORTLET_HACK_KEY);
return hack.getPortletRequest();
}
// otherwise, the regular cast.
return (PortletRequest)request;
}


Did you try to clear the browser cache?  


It seems to be more complex than just saying "MyFacesPortlet won't work when an IceFacesPortlet is present" I just tried this with 2 particular portlets and they seem to be working fine together

(except that the artifacts can be read by the IceFacesPortlet when the page is refreshed by a submit of the MyFacesPortlet ... If however, i click a submit button in the IceFaces portlet, since the page is not refreshed, but the managed bean is reinstantiated indeed, i guet an NPE trying to get the artifacts in the constructor of the managed bean)

So, it seems that "some" MyFacesPortlets stop working in the presence of an IceFaces portlet. ( i tell you, if ICEFaces works well otherwise, i'll migrate all of my MyFaces ones)

We haven't tried deploying an ICEfaces Portlet and a Struts based Portlet on one Portal page. We'll have to explore this scenario to see what the problem might be. However, getting the JSR-168 support complete is our priority for the moment.  


I'm not sure if it is also safe to say that IceFacesPortlet fails in the presence of a StrutsPortlet... But here is a reproductible case:

1 - create a new page in liferay
2 - drop in an IceFacesPortlet
3 - verify it submits
4 - drop in the same page the Collaboration/Callendar portlet (liferay's ootb)
5 - verify IceFacesPortlet still works cuz callendar was ajaxed in the page
6 - Click on the "Day" tab in calendar portlet and then hit the "back" arrow
7 - Submit (or changing tabs, etc) stops working in IceFaces Portlet...

You can interchange #6 with switching liferay pages...

The issue, i think is that, IceFaces based portlets refresh the page when they get added to the page, to include, i bet some comples js ... When a struts portlet is added to the page, the page is not refreshed yet, but when you switch pages or submit another portlet that causes a page refresh, whatever the icefaces portlet needs to work is no longer there or is in conflict with something else...

I see this in the javascript errors window when a struts portlet is present and i click submit to the ice faces one:

Error: window.logger has no properties
Source File: http://localhost:8080/IceFacesGenericPortlet/xmlhttp/1184092513962/icefaces-d2d.js
Line: 2051

Error: connection is not defined
Source File: http://localhost:8080/IceFacesGenericPortlet/xmlhttp/1184092513962/icefaces-d2d.js
Line: 1246

Error: _229 has no properties
Source File: http://localhost:8080/IceFacesGenericPortlet/xmlhttp/1184092513962/icefaces-d2d.js
Line: 1871

I certainly hope this helps... I really dream of a good JSF impl to work with in liferay

Thanks!
ngriffin7a


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


tejash.patel wrote:

Hi,
from last 3 days I have been trying to show icefaces jsf application as portlet in liferay 4.3.
 


Did you put the downloaded sample-icefaces-sun-portlet-4.3.0rc1.war file in the Liferay "Hot Deploy" folder, or directly in the Tomcat webapps folder?

It needs to be placed in the "Hot Deploy" folder. For Liferay 4.3.x, this would be equal to liferay/deploy folder in your home directory.

For example, on Windows:
C:\Documents and Settings\tejash\liferay\deploy

Or on *nix:

/home/tejash/liferay/deploy

If you did put the .WAR archive directly in webapps, then please delete it first.

The next time you start Liferay/Tomcat, it will detect the .WAR in your hot deploy folder, auto-extract it, modify the web.xml as necessary, and auto-copy it to the Tomcat webapps folder.

Regards,

Neil Griffin



ngriffin7a


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


Telpochyaotl wrote:

I can't get the portlet artifacts (portlet request, etc) via the appropiate hack.
 


As of ICEfaces-1.6 final, the following code will provide a means of getting the PortletRequest object in either an ICEfaces or standard-JSF portlet:

Code:
 	public static PortletRequest getPortletRequest(FacesContext facesContext) {
 		PortletRequest returnValue = null;
 
 		Object request = facesContext.getExternalContext().getRequest();
 
 		if (request instanceof PortletRequest) {
 			returnValue = (PortletRequest) request;
 		}
 		else if (request instanceof ServletEnvironmentRequest) {
 			ServletEnvironmentRequest servletEnvironmentRequest =
 				(ServletEnvironmentRequest) request;
 			PortletArtifactHack portletArtifactHack =
 				(PortletArtifactHack) servletEnvironmentRequest.getAttribute(
 					PortletArtifactHack.PORTLET_HACK_KEY);
 
 			if (portletArtifactHack != null) {
 				returnValue = portletArtifactHack.getPortletRequest();
 			}
 		}
 
 		return (returnValue);
 	}
 
ngriffin7a


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


Telpochyaotl wrote:

2 - If an IceFaces portlet is on the screen along with a MyFaces portlet, The MyFaces portlet stops working (no submits)
3 - If an iceFaces portlet is on the screen with a struts based portlet, the struts based portlet works, but IceFaces portlet will not submit anything, and the portlet artifacts strangely enough, become available...
 


I was able to reproduce this issue with Liferay 4.3.0, but not with a snapshot of the Liferay 4.3.1 trunk. This should be resolved when Liferay 4.3.1 is released.

In addition, Liferay 4.3.1 will contain updated sample-icefaces-sun-portlet.war and a sample-icefaces-myfaces-portlet.war archives that are fully compatible with ICEfaces 1.6-final.

-- Neil Griffin
Telpochyaotl

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


Great news Neil!

Thank you sooo much for all your efforts!
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team