Product Logos BridgeIt Services Banner
Liferay Portal-ICEfaces Integration  XML
Forum Index -> Portals & Portlets Go to Page: 1, 2, 3 Next 
Author Message
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2979
Offline


Hi everybody,

There's been a lot of interest shown on integration between ICEfaces and the Liferay portal, so this is a thread to start a discussion on this topic. If you have want to use Liferay with ICEfaces, and have any particular integration concerns/stories, issues about requirements, etc, feel free to add them here.

In the meantime here's a list of some of the other threads concerning Liferay:

IceFaces + Seam + Portlet + Facelets

Anybody want to use Portlets with ICEfaces?
any issues with JSF Components and JSF Portlets
ICEfaces on JSR-168 portlet with Seam + facelets
Failed to execute JSP lifecycle when portlet is called

Thanks,
Philip

.
kunzem

Joined: 15/Nov/2006 00:00:00
Messages: 26
Offline


Nice step to complete the wall :)
erron

Joined: 27/Nov/2006 00:00:00
Messages: 4
Offline


Since I use Liferay, I wouldn't mind an integration. However, I would suggest that the integration be more at the JSR-168 spec level rather than the portal itself, so that a user could deploy to whatever portal environment desired.
redly2001

Joined: 04/Nov/2006 00:00:00
Messages: 9
Offline


i'm just trying to get it to work and it looks
not bad until jet.

my setup:

liferay 4.2.0 (tomcat bundle)
MySql 5.0.27
IcEfaces 1.5.1
TopLink v2.25b for portlet persistence
Facelets as viewHandler


My testapp is an aggregation and customization of the seam+
icefaces+portlet sample, some parts of the icefaces webmail
sample und a lot of other tutorials und samples on the net
(which all cannot be mentioned)

In Firefox my portlet works - with some js errors on the
javascript console however. In IE i can get the same state
if i disable the liferay ajax functions (based on prototype
framework).

The js error on load in IE:

Line: 1668
Char: 1
Error: Object doesn't support this property or method
Code: 0

and if i try to click a button or commandlink i get an error
like: object "connection" unassigned.

i think there is a conflict between the icefaces and liferay
ajax functionality - will continue to examine these problems.


Any kind of help would be highly appreciated!


If there is some interest in my testapp i will provide it as a
zip file in the forum.

thanks,
michael
redly2001

Joined: 04/Nov/2006 00:00:00
Messages: 9
Offline


ok - now it works for me :-)

i was build a new icefaces-d2d.js file without prototype framework
because it is already there in liferay.then i commented out the following
lines of code:

/*
if(window.Event){
document.captureEvents(Event.KEYDOWN);
document.captureEvents(Event.MOUSEDOWN);
}
*/

as far as i know this code is only needed for netscape 4 browsers.

i will provide a little sample portlet the next days,
when i have some spare time.

ngriffin7a


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


Philip,

The company I work for uses Liferay 4.1.0, but will upgrade to Liferay 4.2.1 once it is released.

We have many JSF portlets developed and deployed with Liferay. However, none of the portlets make use of AJAX, so I am eager to rewrite some/all of them using IceFaces components.

My observation is that IceFaces+SEAM is the future, so I am eager to begin testing this combo within Liferay as soon as you solidify your JSR-168 portlet support in your SVN snapshots.

Also, I ran across this JSR-286 (Portlet 2.0) presentation the other day:
http://www.ja-sig.org/wiki/download/attachments/19378/JSR286_Preview.pdf?version=1

Recommend that you all give the presentation a look-see, as Liferay is on the JSR-286 expert panel, and as slide#28 indicates, AJAX is still "forthcoming" in JSR-286.

Frankly, I am concerned that the JSR-286 expert group may not be communicating closely with the JSF 2.0 folks (not sure if that JSR has been filed yet). I think that the IceFaces partial-submit and Direct-To-DOM features are candidates for standardization within JSF 2.0, but there may be an opportunity here for the JSF 2.0 folks to communicate better with the JSR-286 folks regarding AJAX/JSF portlets.

Finally, I thought it worth mentioning that Liferay 4.2.x introduced a new "parallel portlet rendering engine", which enables portlets to render themselves individually (I think using AJAX). Very cool stuff indeed.

Best Regards,

Neil
redly2001

Joined: 04/Nov/2006 00:00:00
Messages: 9
Offline


here is the promissed little sample portlet for the liferay portal.

the portlet is based on the seam+icefaces+portlet sample provided
here in the forum (hopefully it was ok to use it)

it was tested on a liferay 4.2.0 prof. (the tomcat bundle)

the war file is an eclipse export with source included and can be
autodeployed inside liferay.

after adding an instance on a page, a page reload is required
to initialze the portlet correctly.

have fun!!

greetings
michael
 Filename ICEHelloWorld.war [Disk] Download
 Description
 Filesize 4810 Kbytes
 Downloaded:  1272 time(s)

ngriffin7a


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


Michael,

Thanks so much for the sample WAR. I dropped it into my Liferay 4.2.0 hot deploy folder, and these are my results:

1. After copying it to my hot deploy folder and starting Liferay/tomcat, I had to shutdown Tomcat and restart in order for all the CSS stuff to look right. But that's no biggie.

2. I can run the portlet successfully if I download a fresh copy of Liferay 4.2.0, but if I try it with the Liferay "Chat" portlet, I get I get a "permission denied" javascript error when the page loads in IE7. In Firefox 2.0, the error is more precise: "uncaught exception: Permission denied to get property Location.hash"

You see, the Liferay "Chat" portlet is a new AJAX creature, and requires the following modifications to the portal-ext.properties file:

jabber.xmpp.server.enabled=true
reverse.ajax.enabled=true

I think it might be the "reverse.ajax.enabled" property that causes the problem.

Regardless, great stuff Michael! I had posted a link to this article at the Liferay Message Board, and Michael Young asked if I could create a sample portlet. Seconds later, YOU posted this demo portlet! How about that. So thanks for saving us all a lot of time.

Best Regards,

Neil
redly2001

Joined: 04/Nov/2006 00:00:00
Messages: 9
Offline


neil

many thanks for testing my little portlet and even more
for your kindly ratings. i have tried to reproduce your
problem but i was not able to setup the chat portlet.

i have done the properties configuration and added a
chat instance to a page with my hello world portlet but
this does not trigger the problem :-(

so i think i have to wait for the chat wiki or presentation
to get the jabber things to work. then i can take a further
look on that problems.

i will subscribe to the liferay forum where we can treat this
theme any further if you like.

best regards
michael

ngriffin7a


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


Michael,

Sounds great. BTW, I have a post at the Liferay message boards here:

http://www.liferay.com/web/guest/devzone/forums/message_boards/message/24856

Thanks again,

Neil
icheung

Joined: 20/Dec/2006 00:00:00
Messages: 1
Offline


after adding an instance on a page, a page reload is required
to initialze the portlet correctly.  


Michael,
Set ajaxable to false in liferay-portlet.xml
<ajaxable>false</ajaxable>

Referenced here
http://www.liferay.com/dtd/liferay-portlet-app_4_2_0.dtd

Also, we have a chat wiki up with instructions to setup.
http://wiki.liferay.com/index.php/Chat_Portlet

Cheers,
ivan
redly2001

Joined: 04/Nov/2006 00:00:00
Messages: 9
Offline


Ivan,

The wiki i had already found and followed
it but can't get the chat portlet to work.

Maybe i have a typo or something like that,
will give it another try as soon as possible.

Many thanks for your support!

Cheers,
michael
igor_b

Joined: 11/Feb/2007 00:00:00
Messages: 1
Offline


Hi,
I have deployed HelloWorld portlet to Liferay 4.2.1 portal. It works great.

I tried to play with effects adding two commandButtons that invoke Appear and Fade effects on panelGrid. After deployment, previous funcionality of portlet stayed but there is no any sign of effects.

Do anybody succeded to applay effects in portlets? Is there any additional steps to do except those written in Developers guide.

Thank you!
ngriffin7a


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


I have tried to get effects to work within Liferay 4.2.1 as well. But I ran into JavaScript problems.
ngriffin7a


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


NOTE: THIS POST CONTAINS SOURCE CODE FIXES. SEE THE NEXT POST FOR A HELLOWORLD TYPE OF .WAR.

I have been working with ICEfaces-1.5.3 and Liferay-4.2.1 now for a couple of weeks. All testing has been done within Tomcat-5.5.17 and jdk1.5.0_09. Note that I had to put the com.icesoft.faces.delegateNonIface=true context-param in my web.xml file so that I could run ICEfaces portlets alongside my legacy JSF portlets within the same Liferay .WAR deployment.

Attached to this post is all the ICEfaces-1.5.3 source code that I modified to get things working well within Liferay. If you grep through the files for "neil.griffin" then you will find many comments were I try to explain my fixes. Here is a summary of them:

- Added support for the EDIT/HELP modes of the [url=http://portals.apache.org/bridges/multiproject/portals-bridges-jsf/index.html]Apache-JSF-Portlet-Bridge[url]

- Added suport for the VIEW/EDIT/HELP modes of the Sun JSF Portlet Bridge and didn't want to change.

- Fixed the D2D View Handler's getResourceURL() method, so that in portlet environments, the URLs will always include the webapp-context-base-path. I also fixed several components so that they would call the getResourceURL() method to construct URLs for images.

- Fixed the <ice:outputStyle/> tag so that CSS files with a leading "/" character would prepend the webapp-context-base-path.

- Fixed several problems with the <ice:inputFile/> component:
1. Rendered <iframe> was not transparent, and not letting the Liferay theme show through the background
2. Rendered <iframe> had hard-coded width/height which was redundant with the <ice:inputFile style="width:x;height:y"/> syntax.
3. Page generated from the FileUploadServlet that appears within the <iframe> was not getting the webapp-context-path prepended to CSS filenames
3. Rendered <iframe> had wide margins, which needed to be eliminated. I got the margins almost all gone, but the rendered <iframe> element still is indented about 3 pixes too much.
4. A reference to the InputFile object was being stored in the session as an attribute, and then picked up again by the FileUploadServlet and DiskFileUpload classes. When running within Liferay, the session attribute name gets changed, so I had to fix the code to find the session attribute name that Liferay generates.

- The XP theme (xp.css) had some global "body" styles and some other hard-coded colors that were incompatible with Liferay themes. I have commented them out, and have suggested to ICEsoft that these global settings be placed in a separate CSS file (like xp-global.css). I did not mess with the Royale theme. Now, as a more permanent solution, I recommended to ICEsoft that the <ice:outputStyle/> component be given a new "renderForPortlet" attribute, so that the following could be done, fixing the problem so that JSPX pages can run in both Servlet and Portlet environments without change:
<ice:outputStyle href="/xmlhttp/css/xp/xp.css" renderedForPortlet="true"/>
<ice:outputStyle href="/xmlhttp/css/xp/xp-global.css" renderedForPortlet="false"/>

Enjoy,

Neil
 Filename portlet-fixes.jar [Disk] Download
 Description Source code fixes for ICEfaces-1.5.3 to work better with Liferay 4.2.1
 Filesize 128 Kbytes
 Downloaded:  911 time(s)

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