voyent
The simplest combined Woodstock/ICEfaces project does not work correctly  XML
Forum Index -> Woodstock to ICEfaces Migration
Author Message
bbergquist

Joined: 30/Mar/2009 00:00:00
Messages: 44
Offline


I installed a fresh copy of NB 6.5.1 this morning. I downloaded the Netbeans ICEfaces NBMS and installed them this morning. I know I have the latest versions of both!

I then generated the default Visual Web JavaServer Faces application (WebApplication5 is what it generated), and on the Page1.jsp that was created, I put one Woodstock static text and one Woodstock button component. I built and ran the application.

I then proceeded to add in the Visual Web ICEfaces framework and left all of the default options selected (Validate XML, Concurrent DOM View, Enable Rave ViewHandler). I let it do its thing and then ran the application with no changes.

The Page1.preprocess() and Page1.prerender() are being called twice. This leads me to believe the multiple ViewHandler implementations are being called. This is unacceptable.

I just want my Woodstock pages left alone any me ICEfaces pages to work. I don't want to mix Woodstock components with ICEfaces components on a page, I just want each type of page to work correctly.

What in the heck needs to be configured for this to happen? This is probably the simplest application and yet it does not work correctly.

 Filename WebApplication5.jar [Disk] Download
 Description NB sample project
 Filesize 18203 Kbytes
 Downloaded:  77 time(s)

bbergquist

Joined: 30/Mar/2009 00:00:00
Messages: 44
Offline


I got this to work. I started fresh with another project and followed the same sequence, but this time when I added the Visual Web ICEfaces framework, I deselected the "Enable Rave ViewHandler". This left out the following from web.xml:

Code:
   
  <listener>
         <listener-class>org.icefaces.netbeans.rave.web.ui.appbase.servlet.LifecycleListener</listener-class>
     </listener>
 


and left out the following from faces-config.xml:
Code:
     <application>
         <view-handler>org.icefaces.netbeans.rave.web.ui.appbase.faces.ViewHandlerImpl</view-handler>
     </application>
 


and did not include the "wyswyg-appbase.jar" from the libraries specification.

Now the code is using one ViewHandler (well probably two, one be a delegated handler). I have a page with Woodstock components and a page with ICEfaces components, and both are happy.

The Woodstock page properly calls my preprocess and prerender methods only once as expected. Looking at the ViewHandlerImpl in those calls, the standard com.sun.rav.web.ui.appbase.faces.ViewHandleImpl is being used.

On the ICEfaces components, I played around with the partial submit functionality to make sure that that was working. I also mixed standard JSF components and ICEfaces components on the ICEfaces page and that worked as well.

Also, I did not have to remove "icefaces.jar" and replace this with "ice-only.jar".

I have navigation working between the two pages. I changed the web.xml configuration to use "*.faces" suffix mapping for the FacesServlet instead of the "/faces/*" prefex mapping. This allowed me to specify something like:

Code:
    
 <navigation-rule>
         <from-view-id>/Page1.jsp</from-view-id>
         <navigation-case>
             <from-outcome>icefaces</from-outcome>
             <to-view-id>/IcePage1.iface</to-view-id>
             <redirect/>
         </navigation-case>
     </navigation-rule>
     <navigation-rule>
         <from-view-id>/IcePage1.jsp</from-view-id>
         <navigation-case>
             <from-outcome>woodstock</from-outcome>
             <to-view-id>/Page1.faces</to-view-id>
             <redirect/>
         </navigation-case>
     </navigation-rule>
 


in the faces-config.xml to navigate back and forth between pages. Note that the "<redirect/>" is required and this makes sense because the NavigationHandler was to do a "forward" without it, but the wrong servlet and ViewHandler will pick this up. Using the "<redirect/>" causes a completely new request to come in which will then be directed to the correct servlet based on the mapping.

frank.ye

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


add Visual ICEfaces Framework to your existing Woodstock Project. All should be place, no other configurations or settings required.

Is the above working for you?
[Email]
bbergquist

Joined: 30/Mar/2009 00:00:00
Messages: 44
Offline


No, just adding the Visual ICEfaces Framework does not work for me when I leave all of the default selections checked. This adds in the "listener-class" and the "view-handler" configurations as specified below. This then causes the framework to call the "prerender", "preprocess', twice.

So if you think it works out of the box, you should follow the steps that I did with a clean NB 6.5.1 and a clean install of the ICEFaces NBM's downloaded that day, and create default Woodstock project with one page and then add in the Visual ICEfaces Framework and see that the original Woodstock "prerender", "preprocess, etc. twice.


frank.ye

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


list jar files in the war? It should not have appbase.jar
[Email]
bbergquist

Joined: 30/Mar/2009 00:00:00
Messages: 44
Offline


Maybe the WAR file should not have appbase.jar after Visual Web ICEfaces framework has been added to a previous Visual Web JavaServer Faces framework (Woodstock) application, but it does.

Here is a link to a Screencast showing a default Woodstock application that I generate using Netbeans and then immediately add the Visual Web ICEfaces framework and rebuild. It clearly shows that appbase.jar and wyswyg-appbase.jar are present in the built application.

Click here for the screencast

As a follow up, even if ICEfaces were to remove the reference to "appbase.jar", why does it do so? Looking at the source, it seems like the "wyswyg-appbase.jar" is nearly identical but I do see bug fixes in the "appbase.jar" that are not in "wyswyg-appbase.jar". This has me a little concerned as I really do not want to have to retest all of my Woodstock pages.

What is the difference or advantage does the implementation in "wyswyg-appbase.jar" provide?

frank.ye

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


Are you using the latest bundle for 1.8.0? the following library "jsf1.1/1.2 Support" should be removed. If it is not removed, let me know .

wyswyg-appbase.jar including default back bean, the part diff is that ViewHanlder and LifeCycle implementation. ICEfaces is tested with it.

yes, you need test all your Woodstock pages if you want to use it.
[Email]
bbergquist

Joined: 30/Mar/2009 00:00:00
Messages: 44
Offline


Yes, I am using the latest NBM's posted. Here are the versions from the Netbeans Plugins screen:

ICEfaces Design-time and Run-Time Libraries Version 1.8.0.4
VisualWeb ICEfaces Version 3.5.0.4.1.1.1
ICEfaces Project Integration Version 3.5.0.4.1.1.1

The JSF 1.1/1.2 Support library is not removed from the project
frank.ye

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


thanks for the screencast, Are you using dedicated folder for storing libraries? ie, some of custom libraries settings.

can not duplicate in my local,

Could you try the procedure again without using the option when create a new WebApplication?
[Email]
bbergquist

Joined: 30/Mar/2009 00:00:00
Messages: 44
Offline


Yes I am using a dedicated folder for storing libraries. I will try again later this evening without that option and let you know what I find.
bbergquist

Joined: 30/Mar/2009 00:00:00
Messages: 44
Offline


I retried the scenario without using the dedicated library directory and now the appbase.jar is removed.

So it looks like an issue when a dedicated library directory is used.
frank.ye

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


create a jira,
http://jira.icefaces.org/browse/ICE-4364

please attach your project in the screen casts.
[Email]
japaphr

Joined: 23/Dec/2008 00:00:00
Messages: 4
Offline


When I call a woodstock page or a face page they render with any problem, but I get exceptions about lifecycle, anyone has the same problem? Thanks
lagartijoconescalera

Joined: 23/Apr/2009 00:00:00
Messages: 2
Offline


bbergquist or someone, could you upload a simple woodstock-icefaces proyect?. I can't make it works. thank you
deathstar64

Joined: 09/Jul/2009 00:00:00
Messages: 3
Offline


I followed these instructions but when I try to build my project, I get
a lot of errors most of them concerning that it can't find com.sun.rave.web.ui.appbase.AbstractSessionBean;
which is expected if I haven't loaded either appbase.jar or wy*appbase.jar.
If I do load them, then I get the usual exception:
ICEfaces requires the PersistentFacesServlet. Please check your web.xml servlet mappings
 
Forum Index -> Woodstock to ICEfaces Migration
Go to:   
Powered by JForum 2.1.7ice © JForum Team