Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
gjshannon
Post subject: Debugging app ICEfaces and facelets - which library to use?  PostPosted: Dec 30, 2008 - 08:17 PM
Registered Member
Registered Member


Joined: Dec 13, 2005
Posts: 13

I'm a newbie at ICEfaces, so part of this post is my attempt to drill down to what is the best technical question to ask, hence my apologies for the verbose nature.

I have created a new web project using the MyEclipse menu (i.e, I added capabilities to my web project using right mouse click, 'MyEclipse' from the menu) as follows:
a) JSF 1.2 with Facelets, using .xhtml template format
b) ICEfaces 1.7.2

My first step is to get the environment setup correctly, using very simple web pages.

I'm having trouble getting simple pages to display when using JBoss V5 GA server and also when using MyEclipse Tomcat server. So I'm trying to debug why.

I receive no error messages; the test page (text and graphic) simply does not display when I attempt to load it into the MyEclipse browser via URL:
http://localhost:8080/PROJ_RAI_CGRANT/CGrantHome.xhtml

I think that my setup is incorrect, so to begin with I'm simply walking step by step through the configuration to make sure all is good. One area that is unclear is the facelets configuration. Specifically, my question is:

When developing the web pages, etc, I am using the ICEfaces developer's guide which suggests copying the icefaces-facelets.jar file to the WEB-INF/lib folder.
However, this appears to be in conflict with the Facelets 1.1 Library added to the project by MyEclipse. Which path should I follow: 1) use library provided by MyEclipse or 2) use the icefaces-facelets.jar file?

Any suggestions regarding this specific question or other areas to address?

Other: no criticism intended for MyEclipse - I noted that there is a significant difference in the sample application pages in the ICEfaces developer guide versus the template pages produced by MyEclipse. So I am also trying to reconcile which to use.

FYI - I'm using the latest release 7 of MyEclipse.
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
gjshannon
Post subject: Error in MyEclipse setup  PostPosted: Dec 31, 2008 - 12:07 AM
Registered Member
Registered Member


Joined: Dec 13, 2005
Posts: 13

By mistake I had added the ICEfaces tool from the ICEfaces web site on top of my MyEclipse installation. By doing a fresh install of MyEclipse/Eclipse it looks like I removed the problem. Sorry to bother the forum on a simple mistake.

_________________
George Shannon
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
gjshannon
Post subject: RE: Error in MyEclipse setup  PostPosted: Jan 01, 2009 - 08:07 PM
Registered Member
Registered Member


Joined: Dec 13, 2005
Posts: 13

I wanted to mention, just in case anyone else has run into this, that it was necessary to download the latest service pack from ICEfaces and use the icefaces-facelets.jar library in addition to the facelets library provided by MyEclipse. Using this library for facelets seems to have fixed the problem with compiling .xhtml pages noted in another post (sorry I don't know how to add a cross-post link to provide the details; the post was about not compiling xhtml pages).

I wanted to mention this in case anyone is having problems with using JBoss in combintation with ICEfaces and facelets.

_________________
George Shannon
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
gjshannon
Post subject: RE: Error in MyEclipse setup  PostPosted: Jan 06, 2009 - 06:24 PM
Registered Member
Registered Member


Joined: Dec 13, 2005
Posts: 13

I am adding additional information for this posting that may be of assistance since I stumbled upon one path for creating a JEE5 ICEfaces project that seems to work without requiring the workaround I posted above.

It appears that the steps used for creating the JBoss/ICEfaces/JSP project has an impact on the configurations generated by MyEclipse. I'm not sure but it appears that a bug may exist here (I haven't tried different combinations of task sequences to know for sure).

Note that this process does NOT work for JBoss 4.0. This process creates a JEE5 project so it works best with JBoss 4.2.x or higher.

1) The process begins with creating a Web Project (as usual) that is JEE5 compliant.
2) The next step involves adding JSF capabilities through the MyEclipse menu (right-click the project, choose MyEclipse option from menu, and then choose "Add JSF Capabilities...".
3) When configuring JSF, I did NOT choose the option for JSF facelets (do this after adding ICEfaces below).
4) Then add ICEfaces capabilities in the same manner (right-click project, choose MyEclipse option from menu, and then choose "Add ICEfaces capabilities...").
5) Now add facelets support by right-clicking project, choose MyEclipse option from menu, and then choose "Add ICEfaces facelets support...".

When I followed this process, the MyEclipse added the ICEfaces facelets library to the project.

However, if in step two (add JSF capabilities) I had chosen the option to add facelets support, the ICEfaces facelets library is NOT added by MyEclipse.

Hence my guess is that somehow there is a missing step in MyEclipse for adding facelets support for ICEfaces projects if facelets is chosen when adding JSF capabilities (i.e., before adding ICEfaces capabilities my guess only).

By the way this seems to work on JBoss 4.2.x and Tomcat 6.

Just trying to contribute to see if this is something the development team might want to check out.

I'm in a big hurry to prepare for a product demo, so hopefully my quick and dirty analysis is accurate - I may be in error since I did this in a bid rush.

_________________
George Shannon
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
gjshannon
Post subject: RE: Error in MyEclipse setup  PostPosted: Jan 06, 2009 - 06:46 PM
Registered Member
Registered Member


Joined: Dec 13, 2005
Posts: 13

Duh, yet another mistake when in a hurry. I'm posting way too much.

Of course MyEclipse cannot add ICEfaces facelets BEFORE the user chooses to add ICEfaces capabilities. I'm not suggesting that this be done in the the step where a user adds JSF and chooses to use facelets.

What appears to be missing are the steps required to adjust the project configuration correctly after adding JSF with facelets. MyEclipse does not appear to correctly adjust after the user chooses ICEfaces if in the prior step the user adds JSF to their project configuration and when doing so chooses to add facelets.

This shows up when dragging and dropping an .xhtml page to the faces-config flow screen after following the path I described in the last post to create a project. An error occurs stating that "XHTML files can only be used in JavaServer Facelets-enables projects" and it won't let me drag and drop the .xhtml page to the flow screen. This occurs despite my having facelets support added to the project but using ICEfaces facelets, not sun facelets. My impression is that MyEclipse seems to have forgotten that I already did this via ICEfaces.

To correct this I use the MyEclipse menu for the project and choose "Add JSF facelets capabilities...". When using this menu I get an error message which squawks about using the ICEfaces view handler instead of the sun view handler. The message gives the option to overwrite the existing ICEfaces view handler with the sun view handler. I do not choose this option otherwise the web pages do not seem to work properly.

Hence it appears that a configuration pathway seems to have some sort of bug in it when using ICEfaces and facelets.

Sorry for being verbose - just trying to contribute since I know how frustrating it is to get a project setup correctly when in a hurry to meet a deadline.

Now I'll shut up.

_________________
George Shannon
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits