Has anyone really understood the JSF LifeCycle

I have created my own phase listener :
public class MyPhaseListner implements PhaseListener {
public void afterPhase(PhaseEvent evt) {
System.out.println("EXITING : " + evt.getPhaseId());
public void beforePhase(PhaseEvent evt) {      
System.out.println("ENTERING : " + evt.getPhaseId());
public PhaseId getPhaseId() {
return PhaseId.ANY_PHASE;
When i display my page first time I am getting the following output :
ENTERING : RESTORE_VIEW 1
EXITING : RESTORE_VIEW 1
ENTERING : RENDER_RESPONSE 6
Inside Constructor
Managed Bean Created.......
Thank you !!!!
EXITING : RENDER_RESPONSE 6
ENTERING : RESTORE_VIEW 1
EXITING : RESTORE_VIEW 1
ENTERING : RENDER_RESPONSE 6
EXITING : RENDER_RESPONSE 6
ENTERING : RESTORE_VIEW 1
EXITING : RESTORE_VIEW 1
ENTERING : RENDER_RESPONSE 6
ENTERING : RESTORE_VIEW 1
EXITING : RESTORE_VIEW 1
ENTERING : RENDER_RESPONSE 6
EXITING : RENDER_RESPONSE 6
EXITING : RENDER_RESPONSE 6
As per my knowledge I can understand first 4 statements(before "*****") outputted.
An empty view is created and then render response phase is reached skipping all intermediate steps being the first request to JSF page.
However I can not understand further calls made by JSF lifecycle.
Can anyone elaborate me more on this?
Also I am very much interested in some strange number displayed after every phaseId !!!!!

Hi Sergy !
Thanks for your reply.!!!!
Well actually I have some style-sheets and images on my page.
I think JSF even treats these elements to be a seapare entity.
So all other statements were for these elements.
Well I have modified my phase Listener to reflect the view Id as well.
Below is the class...if anyone is interested !!!
package util;
import javax.faces.component.UIViewRoot;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
public class MyPhaseListner implements PhaseListener {
     public void afterPhase(PhaseEvent evt) {
     UIViewRoot root = evt.getFacesContext().getViewRoot();
     if(root == null){
          System.out.println("EXITING : " + evt.getPhaseId());
     }else{
          System.out.println("EXITING : " + evt.getPhaseId() + root.getViewId());
     public void beforePhase(PhaseEvent evt) {
          UIViewRoot root = evt.getFacesContext().getViewRoot();
          if(root != null){
               System.out.println("ENTERING : " + evt.getPhaseId() + root.getViewId());
          }else{
               System.out.println("ENTERING : " + evt.getPhaseId());
     public PhaseId getPhaseId() {
          return PhaseId.ANY_PHASE;
}

Similar Messages

  • Has anyone successfully implemented the JSF Viewer with Facelets?

    We have recently started integrating Crystal into one of our web apps that is using JSF + Facelets + Seam.
    I've built a taglib for the jsf viewer and configured it in web.xml and faces-config. I'm pulling an IReportSource from a backing bean using com.crystaldecisions.reports.sdk.ReportClientDocument  and that is using a .rpt file stored on a directory. This all seems to be working, as I can step through the code and see the IReportSource being generated.
    However, when the page loads, I am seeing the crystal javascript being converted in the page source, but nothing is loading on the page. 
    Has anyone seen an issue similar to this tied to Facelets? I've seen numerous documentation on Crystal and JSP, but very little on JSF  or Facelets.
    Has anyone been able to get a setup like this or similar to work properly?
    I've also noticed an error when adding the viewer:
    java.io.IOException: Recover report client document state failed.
    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.readExternal(SourceFile:1492)
    at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.readExternal(SourceFile:131)
    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
    I believe this to be related to me switching over to the serializable ReportClientDocument: com.crystaldecisions.sdk.occa.report.application.ReportClientDocument  versus using the nonserializable version.
    When using the non-serializable version, I am seeing a constructor issue with the JPEReportSource
    Exception: java.io.InvalidClassException: com.crystaldecisions.reports.reportengineinterface.JPEReportSource; no valid constructor
    Has anyone seen this issue before or able to offer any suggestions?

    Well, according to the tutorials I have seen on the internet, I believe CrystalReport was successfully implemented and tested with jsp, to have it working with Facelets, we need to do a little bit of work around. We need to make a new JSF custom component and assign it to an external renderer. then we can use it to view the report
    please follow these and it should work after then,
    1- bring the following jars into your libs
    commons-configuration-1.2.jar
    Concurrent.jar
    CrystalCommon.jar
    CrystalContentModels.jar
    CrystalDatabaseConnectors.jar
    CrystalFormulas.jar
    CrystalQueryEngine.jar
    CrystalReportEngine.jar
    CrystalReportingCommon.jar
    icu4j.jar
    jrcadapter.jar
    jrcerom.jar
    keycodeDecoder.jar
    MetafileRenderer.jar
    rasapp.jar
    rascore.jar
    rpoifs.jar
    serialization.jar
    URIUtil.jar
    webreporting.jar
    webreporting-jsf.jar
    xercesImpl.jar
    xml-apis.jar
    2- bring the folder "crystalreportviewers115" right under the "WebContent".
    3- implement the custom FacesComponent and make it extend the "UIReportPageViewer" as follows;
    import packagename.CustomReportRenderer;
    @FacesComponent ("packagename.newReportViewer")
    public class UIReportViewer extends com.crystaldecisions.report.web.jsf.UIReportPageViewer implements Serializable{
        public UIReportViewer () {
            this.setRendererType("packagename.CustomReportRenderer");
    4- implement the renderer and make it extend the "ViewerHtmlRenderer" as follows;
    @FacesRenderer(componentFamily="CrystalReports.DHTMLViewer", rendererType="packagename.CustomReportRenderer")
    public class CustomReportRenderer extends com.crystaldecisions.report.web.jsf.ViewerHtmlRenderer implements Serializable {
    5- make a new tag library xml file next to the web.xml so the application can find the tag configurations. name it "taglib.xml" and add the following inside it;
    <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee"
        version="2.0">
        <namespace>http://new-jsf-custom-components/</namespace>
        <tag>
            <tag-name>ReportViewer</tag-name>
            <component>
                <component-type>packagename.newReportViewer</component-type>
                <renderer-type>packagename.CustomReportRenderer</renderer-type>
            </component>
        </tag>
    </facelet-taglib>
    6- configure the web.xml with the following
      <context-param>
            <description>
            State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
        <context-param>
              <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
            <param-value>/WEB-INF/taglib.xml</param-value>
        </context-param>
        <context-param>
            <param-name>crystal_image_uri</param-name>
            <param-value>../../crystalreportviewers115</param-value>
        </context-param>
    7- implement the reportViewer.xhtml and make sure you have the following;
    - in the tag libraries add the namespace schema xmlns:crystalnmcps="http://new-jsf-custom-components/"
    - add the new reportViewer component
    <crystalnmcps:ReportViewer reportSource="#{youController.reportSource}"  displayToolbarLogo="false" parameterFields="#{youController.parameterFields}"  allowParameterPrompting="false" />
    Now run your app.
    I hope this helps. good luck

  • Has anyone really fixed the windows to ipod comunication problem?

    I have tried all of the suggestions I see here and now I sit here in front of a 300.00 dollar calender. I tried the 5 R,s, none worked. I tried uninstalling and re installing and still nothing. I havent tried downloading any more Apple or Mac software because I dont trust it now. Is there some whre I havent looked yet, please help I.m losing interest in the big ipod phenomenon.

    Unfortunately, there is no one ‘Silver Bullet’ answer for this issue. Many things can contribute to the problem. Here are various ‘generic’ solutions that you can try in an effort to correct your problem. One should work. These are listed in simplest to more involved order (usually).
    First, make sure that the iPod is fully charged.
    Try Resetting Your iPod while it's connected to the computer.
    Hold down the Menu and Select buttons until you see the Apple logo (or Menu & Play/Pause in older models).
    This will often get it recognized. It may take several attempts.
    Try closing and re-starting iTunes. There have been cases where iTunes refuses to see an iPod, but after re-starting, it works again.
    Also try re-booting the entire computer. Especially if the PC has been operating for a long time &/or many programs have been opened and closed, repeatedly.
    Other USB connected peripherals may be the cause as well. Try removing all connected USB items and attaching the iPod. If you have a USB keyboard, it may be worth a try using the adapter to convert it to non-USB. If the iPod connects, continue plugging things back in until you have the problem return. You may have then isolated the issue. Sometimes it could be a printer, camera, Flash Card reader, or other attached device causing a conflict.
    If your iPod shows up in Explorer under 'my computer' try changing the drive letter:
    -- Click on Start=>Control Panel=>Admin Tools=>Computer Management=>Disk Management
    -- Right-Click on the iPod and select “change drive letter”
    -- Choose something further along in the alphabet that is unused (Usually, “M”, “N”, “O” or something similar)
    -- Safely eject the iPod
    -- Reboot the PC
    If that doesn't work, Put Your iPod into Disk Mode then plug it in and you should be able to Restore the iPod
    Your PC may have difficulty with the USB2 protocol and the iPod. See this Article for a possible solution: iPod not Recognized Correctly
    Also try these hints (and the other suggestions above) from any other USB port you may have on the PC. Sometimes switching USB ports can make all the difference.
    Also See:
    Your Windows PC doesn't recognize iPod
    iPod does not appear in iTunes or on the desktop
    iPod appears in Windows Explorer but does not appear in iTunes“Strange iPod Behavior within Windows”
    If you are getting a ‘Missing Drivers’ message, try this:
    1. Go to http://www.driverguide.com and register (free)
    2. Download ‘usbstor.sys’ & ‘usbstor.inf’ to your PC and place them in your i386 Folder
    3. Update both drivers by selecting the two files you just downloaded
    4. Reboot computer
    5. Open iTunes and then connect you iPod
    If all the above fails, you may have a Virus, Malware or SpyWare problem.
    If you do find that your Device Manager is blank, you should probably check up on this issue first: No Items Appear in the Device Manager List When You Open It
    There have been some successes using the information in this post below. WARNING: I have absolutely no clue to what this download file does, and introducing it into your PC environment is risky. Some Forum posters have experienced less than benign results. Read the thread through and see the tips below. Proceed at you own risk: http://discussions.apple.com/message.jspa?messageID=1222335#1222335
    The above tool looks like it removes (or it's supposed to remove) Apropos adware. Apropos is a known cause of this problem: iPod not recognized and Windows Device Manager is empty
    ... but other adware using the ContextPlus engine has also been known to cause similar effects.

  • Has anyone really solved the "Media server unexpectedly quit" error?

    I've seen many posts and suggested solutions, but no definitive solution. This is a severe problem for Final Cut Pro, and it's presently keeping me from doing any kind of work with this software.
    Thanks for any help on this!!
    Greg

    I've seen many posts and suggested solutions, but no
    definitive solution. This is a severe problem for
    Final Cut Pro, and it's presently keeping me from
    doing any kind of work with this software.
    Thanks for any help on this!!
    Greg
    Greg,
    This solved the problem for me.
    "In Compressor, if the "Video Format" is set to "Automatic", Batch Monitor fails (with the "Media Server unexpectedly quit" error).
    changing the Video Format to NTSC and the frame rate to 29.97 (but leaving the Field Dominance on Automatic), the job submits and processes fine."
    Make Video Format PAL and the frame rate 25, if working with PAL sources.
    Good luck,
    Luc
      Mac OS X (10.4.6)  

  • Making the most of the JSF lifecycle

    I have read through some documenation for the JSF lifecycle, I am wondering though how you would really take advantage of it?
    One of the purposes of JSF was to insulate the developer from having too know much about HTTP. However, how much do they really need to know about JSF lifecycle and what cool things are there that really show the usefullness of this lifecycle being exposed?
    Thanks.

    beginner2 wrote:
    I have read through some documenation for the JSF lifecycle, I am wondering though how you would really take advantage of it?You don't. The phases of the lifecycle are just how JSF ticks; they are not there to make your life easier, they are a design choice you have to know about and have to know how to design around. Not knowing about them is eventually going to lead to unexpected behavior caused by wrong assumptions.
    One of the purposes of JSF was to insulate the developer from having too know much about HTTP. Utter nonsense, IMO. To use JSF, you should be incredibly familiar with HTTP, HTML and Javascript. Sticking your head in the sand and not taking the time to know the very foundation you are working on is going to make you step in a pothole and hurt yourself badly sooner rather than later.
    Of course, that does not stop people from trying. If you want to meet them, they regularly post "how do I do this", "why does this happen" and "bug in JSF?" questions right here in this forum.
    However, how much do they really need to know about JSF lifecycleKnow what each phase of the lifecycle does and in which order they are executed. Know when a phase will be skipped. That is in my opinion what you should know to avoid the gotchas.
    and what cool things are there that really show the usefullness of this lifecycle being exposed?See previous statements.

  • Has anyone actually got the Green Screen feature to work?

    Has anyone actually got the Green Screen feature to work? I've been trying for about 8 hours, absolutely no success. I have followed the iMovie Help instructions and the examples on the internet, over and over again. I've tried every imaginable variation on the instructions. Nothing from my green movie shows up. The green in my video is pure green - 100% green, 0% red and 0% blue. Yet the non-green images in the video aren't getting displayed at all. Several other people have mentioned a similar problem on these forums and they are all "unanswered". Is that because this is an unsolvable problem? Is it an iMovie bug? Sigh. I'm a big fan of Apple but stuff like this gives them a bad name.

    After several more hours of diagnosis I have identified some conditions which can make Green Screen slightly work (but not much). The condition is as follows. The green screen clip must be carefully dropped at the beginning of a video clip, such that at least the first two seconds of the green screen clip (no less, but no more or the clip will become attached to the previous clip and then it's broken again) are displayed over the PREVIOUS video clip. But the green screen will not work on the previous clip, only on the second clip. So you will always lose the first two seconds of the green screen video. It took me a lot of experimenting to discover this anomaly.
    Clearly this is a bug, but since not all users on the internet experience this bug, (some online videos shows that Green Screen actually works as advertised) it's most likely related to the video card driver. My video card is an ATI 4870. If you have such a card, there's probably no hope that you can get this feature to work unless Apple fixes the driver or possibly the iMovie application, or you use my tricky workaround.

  • Has anyone tried changing the drummer on a drummer part that has already been placed into a track stack?

    Has anyone tried changing the drummer on a drummer part that has already been placed into a track stack?
    I find that if I do that, the parts in the stack all get merged together with no way to expand them (ie the triangle you would click on to expand the stack disappears).
    I believe this is a bug, and wonder if anyone else has encountered it?

    Mac Fool wrote:
    Unfortunately, when I click on the link I get "Error: you do not have permission to view the requested forum or category".
    i believe the thread was removed due to the discussion was not in accordance with the ToU of the forum. it was a heated discussion as well (i was following it).
    here's a similar discussion from the Apple TV forum. note the very last post ...
    http://discussions.apple.com/thread.jspa?threadID=2313089&start=0&tstart=30
    JGG

  • HAS ANYONE GONE OVER THE 2GB DATA PLAN???

    JUST WONDERING HAS ANYONE GONE OVER THE 2GB DATA PLAN? IS THAT ENOUGH DATA FOR THE MONTH? EVERYDAY NORMAL USAGE ANY INPUT WILL HELP THANKS!!!

    before returning .. i have used my iphone for 10 days and my data usage was 20 MB ! I was scared i will over shoot, so i always used in wifi hotspots and i kept my 3G and data off . ! But i dont think you will overshoot even if you check mails or browse a lot. Unless you want to see movies or video conference.

  • Has anyone else experienced the stopping and starting again while  playing music in iTunes.  It was fixed but with the last update it has started skipping again.

    Has anyone else experienced the stopping and starting again whil playing music in itunes.  It was working fine wit the prior fix, but after the last update
    it started skipping again. 

    Try it in another vehicle see if it still happens, at least you can narrow it down to your  phone or the car. My 4s play totally fine, I have never had any of those issues. Maybe its time to restore your phone and start over. I would also have someone else play their Iphone in your car, see if it happens to them. Or try yours in someone elses car. Good Luck!

  • Has anyone else had the issue of losing the YouTube apps on the original IPhone after updating to 4.3.5

    Has anyone else had the issue of losing theYouTube app on the original IPhone after updating to 4.3.5?  (The Restrictions is turned as OFF)
    The Youtube app is now cleaned away from the IOS 4.3.5
    Any help would be appreciated.

    This still doesn't make sense. The iPhone 4 may have come with a number of different versions of iOS out of the box depending on when it was purchased and how long it had sat on the shelf.
    If you can't find it, check restrictions and make sure you haven't locked it out.

  • Has anyone run into the problem of downloading or opening an E.pdf file? I am running on 10.6.8 and am unable to open the file. Any suggestions?

    Has anyone run into the problem of downloading or opening an E.pdf file? I am running on 10.6.8 and am unable to open the file. Any suggestions?

    That crash appears to be casued by the Facebook plug-in.
    Create a new account (systempreferences -> accounts or Users & Groups on 10.7 and 10.8), make a new Library in that account, import some shots  and see if the problem is repeated there. If it is, then a re-install of the app might be indicated. If it's not, then it's likely the app is okay and the problem is something in the main account.

  • Has anyone else lost the ability to see  apple tv on the device list, its no longer under devices either!, has anyone else lost the ability to see  apple tv on the device list, its no longer under devices either!

    has anyone else lost the ability to see  apple tv on the device list, its no longer under devices either!, has anyone else lost the ability to see  apple tv on the device list, its no longer under devices either!

    *Feedback*
    "Use the form below to send us your comments. We read all feedback carefully, but please note that we cannot respond to the comments you submit."
    http://www.apple.com/feedback/ipad.html
    We can complain about Apple's business decisions, but these discussions are user to user talk about possible solutions.
    Here are the places to report bugs:
    Get an account at
    http://developer.apple.com/  then submit a bug report to http://bugreporter.apple.com/
    Once on the bugreporter page,
       -- click on New icon
       -- See if you need to attach a log file or log files, clicking on Show instructions for gathering logs.  Scroll down to find the area or application that matches the problem.
       -- etc.

  • My ipod classic keeps showing error code 1439 and says its corrupted and nothing on the site that it says to do is working has anyone else had the problem

    my ipod classic 160 gb keeps showing error code 1439 and says it is corrupted and i have done everything the article on it says to do and still reads the same thing. has anyone else had the same problem if so what can i do to fix it. the ipod is only 2 months old

    If it is under warranty, bring it in to Apple Store, most of our suggestions, comes from the Apple support site..
    Besides Restoring the iPod, there are winsocks which have conflict with iTunes, perhaps, disable those plugins and disconnect the Internet and stop antivirus, while you are Restoring or Syncing the iPod.

  • Cant open web pages when connected to the internet via Telstra's Pre Paid WiFi has anyone else had the same issues works fine with BigPond WiFi

    Cant open web pages when connected to the internet via Telstra's Pre Paid WiFi (this connection is working on other devices) has anyone else had the same issues, works fine with BigPond Wifi

    and now, when i tried to check again my network preference below the airport tab is showing a message that
    "my airport does not have an IP address and cannot connect to the internet!"
    then after seconds it will goes back to the first message that
    "airport has the self assigned IP address etc....."
    i don't know whats going on now!
    airport tab is not showing green color anyway! i'ts always in yellow!
    i tried turning it on and off but nothing happen! HEEELLLLPP!!!!

  • I am unable to manually add artwork via itunes 12 on windows 7. I've tried all the suggestions to no avail. Has anyone succeeeded on the same platform as me?

    i am unable to manually add artwork via itunes 12 on windows 7. I've tried all the suggestions to no avail. Has anyone succeeded on the same platform as me?

    The new iTunes 12 Get Info dialog lacks right-click context menus (at least for now) but it still accepts most standard keyboard shortcuts and drag & drop actions.
    Delete Artwork
    On the artwork tab of Get Into, tap the image in question, use Backspace or Ctrl+X. Delete doesn't work.
    Or, tap the image at the top left of Get Info, this time use Backspace or Delete, it is Ctrl+X that doesn't work.
    Add Artwork
    Select artwork, press Ctrl+C to copy, tap the centre of the Artwork tab, press Ctrl+V to paste.
    Or, select artwork, press Ctrl+C to copy, tap the small image area at the top left, press Ctrl+V to paste.
    Or, you can drag & drop to, or sometimes from, the same locations.
    You can also copy artwork from the Get Info dialog to Windows Explorer with the keyboard shortcuts.
    If the source image is on a web page right-click and use Copy Image rather than copy. (With Chrome I get a one pixel wraparound so tend to go for a temporary local copy anyway - not sure whose bug this is, but it isn't new.)
    If you have multiple images embedded drag the one you want to be the primary artwork to the leftmost position.
    Replace/Remove All Artwork
    The top left image box can be used to add or delete art from multiple tracks. In either case all existing artwork in all tracks is replaced/removed.
    Old Style Get Info Dialog
    Select some items, right-click, hold down shift, then click Get Info from the context menu. (Use alt/option on a Mac)
    If you still cannot add artwork via any of these methods then I would suspect a permissions problem. See Repair security permissions for iTunes for Windows.
    tt2

Maybe you are looking for

  • SSO to a hosted R/3 system

    Can we use SSO with logon tickets when the R/3 system is hosted by an external partner and the domain name is not the same as the domain name of the portal server? We're accessing the R/3 trough a VPN tunnel. Will SSO work also when accessing the por

  • Read data from a text file, one line at a time.

    I need to read data from a text file, and display each line in a String Indicator on Front Panel. It displays each line, but I get Error 4, End Of Line, unless I enter an extra line of data in the file that I don't need. I tried Read From Text File.v

  • Display a specific structure based on user input

    Hello All, I have a aging report in which one aging is based on Group currency and the other aging based on Document currency, user should be able to specify which bucket he wants to see as a input selection and the report should only display that ag

  • Cisco Aironet 1300 QoS

    Hello, I have 2 Cisco Aironet 1300 Bridges which provide data and voice communication between 2 buildings. Up until recently QoS has not been needed, but lately there appears to be congestion due to reports of poor voice quality. Building A houses a

  • Need Script to save multiple FrameMaker 9.0 files as .mif

    I am using FrameMaker 9.0 on a PC. I have a number of UNIX scripts that work on .mif files. With the older versions of FrameMaker, I was able to run FrameMaker on Unix and use the batch capabilities to create a script that opened the book and saved e