PhaseListener and Load of Page

Hi All,
I'm trying to create a JSF page which will dynamically create additional content as soon as it is loaded. In order to do this I have created a PhaseListener which creates a few components and attaches them to the page on the PhaseEvent. This works fine whenever I reload the page (by creating a postback), but on the initial load of the page the Listener's events aren't triggered. What do I need to do in order to have an event trigger the first time a page is loaded? My code is as follow:
public PageBean() {
    LifecycleFactory lLifecycleFactory = (LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
    Lifecycle lLifecycle = lLifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
    lLifecycle.addPhaseListener(new OnLoadPhaseListener());
@Override
public void beforePhase(PhaseEvent iPhaseEvent) {
    populateComponents();
@Override
public PhaseId getPhaseId() {
    return PhaseId.ANY_VIEW;
}Interesting thing is if I change the getPhaseId() to return RESTORE_VIEW, the events are never triggered.
Any and all help is appreciated,
Ristretto
Ps. I tried registering the PhaseListener in the faces-config.xml instead of the code, but it didn't make a difference.

I tried registering the phase listener in faces-config.xml this morning and for some reason it worked this time - must have something to do with the weekend ;)
Anycase, to answer your question, I am trying to create a base class from which all other managed page beans will inherit, which will provide default functionality. One of the things I want to provide is a default PhaseListener which the child classes can just use by overriding the methods of the base class. Now, as this base class will be used by multiple JSF projects (which are contained in WARs), I would like to JAR the base class and just include it with the other projects. If I do this, however, every faces-config.xml in every WAR will be required to register the PhaseListener, instead of just being able to inherit from the class. I would like to make the JAR completely self-sustainable, you merely need to inherit from the base class in order to use its PhaseListener.
Any ideas on how I can accomplish this?
Ristretto

Similar Messages

  • Anyone notice that Firefox downloads and load a page a lot slower then Dolphin HD?

    Anyone notice that Firefox downloads and load a page a lot slower then Dolphin HD? That has been my experience all morning. I'm on Verizon Droid 2.
    I been testing various web pages using Dolphin & Firefox Mobile, and I have noticed that in general, web pages takes longer to download and slower to render in Firefox Mobile then in Dolphin HD. It is not a cache issue as I clear my cache between tries.
    Firefox Mobile 4 (downloaded 3/21/2011)?
    Dolphin HD 4.5.0

    I have the same problem on my website. It only happens in Firefox. IE, Chrome and Safari are working fine.
    Very strange behaviour. Check this page: http://1stlook.nl/webdesign-eindhoven.html
    You have to push the orange button twice. First time it only drops. Only if you click in the right corner it works???

  • Javascript and loading of pages

    I have problems with using multiple websites 'opening in tabs' while loading about 15 sites concurrently, several sites have Javascript runtime errors that slow down the whole process. my questions are these:
    1. How many sites should I expect to open concurrently and not have loading problems?
    2. How can I speed up sites that have nearly 100% JavaScript on their pages which I have problems opening even as a single page (Gizmodo.com)
    3. What is the 'spinning beach ball of death' on when loading pages? Is it due to Flash, Java?  I use ClicktoFlash on all my pages and I have an AdBlock always on.
    I used to blame my crashes on Safari on Flash, but I'm thinking that Java or JavaScript may be the problems instead. Any suggestions?

    Mac OS X (10.5.5)
    If you are really running v10.5.5, you need to update your system software.
    Click the Apple  menu (top left in your screen) then click:  Software Update ...
    What is the 'spinning beach ball of death' on when loading pages?
    Turn off Extensions in Safari / Preferences. See if that makes a difference. AdBlock might be the culprit.
    From your Safari menu bar click Safari / Preferences then select the Security tab. Deselect: Enable plug ins Quit then relaunch Safari. If Safari speeds up loading tabbed pages, troubleshooting help here. Unsupported third-party add-ons may cause Safari to unexpectedly quit or have performance issues
    Try Safari in another user account. Same lag time there, log back into your admin account, launch Disk Utility. Verify the startup disk. If it needs repairing, help here for Using Disk Utility to Verify and Repair Disks
    From the Safari menu bar click Safari / Reset Safari. Select the top 7 buttons, click Reset.
    The Spinning Beach Ball of Death

  • Slow Youtube videos and loading web pages - Tests ...

    Hello. I've been having this problem for over a week now. Whenever I try to watch a Youtube video or load a web page it is incredibly slow and most of the time they don't even load. I've phoned up customer service 4-5 times and had several online chat sessions but no one has been able to resolve my problem. It is quite strange as all the speedtests I run show that I'm getting 19-20Mb/s, but I can hardly even load a 144p Youtube video.
    I will say that it is not always like this, sometimes throughout the day everything will run fine but mostly it's incredibly slow, especially the Youtube videos.
    I really hope that someone here can help me solve my issue as I feel like I've tried everything.
    Thanks

    Hi Welcome to the community forums
    Here is a basic guide to getting help from the community members done by CL Keith Please read through the link posted http://forumhelp.dyndns.info/speed/first_steps.html
    once you have posted the information asked for then the community members can help you more
    if using a hub 4 locate these lines located in the hub logs
    Lines should look like this
    19:11:29, 07 Nov. (2290101.460000) DSL noise margin: 7.00 dB upstream, 6.10 dB downstream
    19:11:29, 07 Nov. (2290101.390000) DSL line rate: 448 Kbps upstream, 288 Kbps downstream
    Thank You
    This is a customer to customer self help forum the only BT presence here are the forum moderators
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • Auto-checking if Flash player is installed and loading other page if not

    Hi,
    can someone tell me if it's possible and if yes what the
    script is and
    where to put it in order to:
    have the browser check upon loading page X to see if the
    user's computer has Flash player installed. If answer is "no", then
    browser loads page Y instead of page X.
    Thanks
    Peter

    You can detect the Flash player (and version) with javascript
    and redirect or change the visibility of DOM objects based on the
    detection results.
    I believe that SWFObject has this functionality built in by
    default:
    http://code.google.com/p/swfobject/
    Dreamweaver also has a pre-built behavior to do this.
    Behaviors panel: click the plus button and select "Check Plugin",
    select "Flash" from the drop-down list at the top and fill in the 2
    URLs. Presto!

  • In Internet Explorer I was able to right click and load the page as a PDF file. Can I do this with Firefox?

    I have searched everywhere for this. When I go to "Tools" then "Options" then "Applications" I see that Adobe Acrobat is enabled however I do not see anything on Firefox that allows me to use it to convert a web page over to a PDF.

    It does not ''''convert a web page over to a PDF.''''
    If you have a link to a pdf just open it as you would any other web page or link. It will open as a webpage displaying as the pdf document that it linked to.
    * see [[Using the Adobe Reader plugin with Firefox]]
    * click this link to test --> http://plugindoc.mozdev.org/testpages/pdf.html

  • How to spilt the screen in to frames and load different pages in a single window??

    i want to split the screen in to frames using flex help me...

    Welcome to the forum!
    The video I want to create is look like a cubic, with my face all around the centre and looking to her ( a video of her will be in the centre) and 8 different video of mine looking to hers.
    Put the clip(s) of you on 8 different video tracks in the timeline above each other, and the clip of the girl you want in the center on a 9th video track.
    Double-click one of the clips to open it into the viewer. Click the motion tab. There, adjust the scale value so it is the right size and the center value so that it is correctly positioned. Repeat for the other 8 video tracks.
    Hope this helped,
    Sasha

  • My version of Firefox is sooo slow in response. I'm using OSX snow leopard. Should it take 3 or 4 seconds to switch tabs? it didnt use to. And loading hotmail pages is worse. This compares to previous years when it was the fastest browser out there

    Mac mini 2.1 Intel core 2 duo 1.83ghz
    Mac OSX 10.6.8
    FIreFox 9.0.1

    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.org/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    If that new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • I wont to use IE for some pages and Firefox for others, but when I enter a url in IE, Firefox loads and opens the page

    I use IE 8 and the latest version of Firefox in XP.
    I'm a web designer and I want to test pages in both explorers but sometime i enter a URL in IE and Firefox opens and loads the page. How can I stop this happening?

    See http://kb.mozillazine.org/Website_colors_are_wrong
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Firefox takes minutes to load upon starting up and changing web pages

    When I open firefox in Windows Vista, it takes minutes(sometimes up to ten) to start up.Once firefox has loaded and I go to visit another web page, it takes minutes to load that web page. I downloaded Firefox 3.6.7 when it first came out, and it just recently started doing this. I tried uninstalling and reinstalling firefox, but this did not work. It is not a problem with my internet connection or operating system, because internet explorer and safari only takes seconds to load up and load web pages. I have run various scans to see if it was a virus or a bug, but nothing came up. How do I fix this, because using Internet Explorer is really getting on my nerves?
    == This happened ==
    Every time Firefox opened
    == Two days ago ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; (R1 1.6); SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.1; .NET CLR 3.5.30729; WinNT-PAI 22.08.2009; .NET CLR 3.0.30729; .NET4.0C)

    Clear Cookies & Cache
    * https://support.mozilla.com/en-US/kb/Template:clearCookiesCache
    Clear the Network Cache
    * https://support.mozilla.com/en-US/kb/How%20to%20clear%20the%20cache#w_clear-the-cache
    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Check and tell if its working.

  • Its loading a page before even i type in the right URL. how can i prevent forefox from automatically loading the suggested page before i hit enter?

    when i type in address bar, its great that the url is automatically filled in based on the history of browsing. but i dont want the page to be loading at the same instant. for ex. if i want to type thehindu.com, once i type 't' its taking for granted that i am typing thermopedia.com and completes the url and loads the page at the same time. I appreciate the url suggestion but not the page loading at the same time. this wastes my data usage (Highly inefficient).
    To complicate the problem, when i type the second letter sometimes it gets appended to the already auto completed url and heads to search for the completely messy words in the default search engine.
    Basically the addressbar has become useless and so is firefox usage. I'm completely frustrated and spoiled over an hour fighting the issue. please provide options to control the loading of the page automatically even if the url is automatically filledin.

    Try some basic troubleshooting.
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • Error loading JSF page popup window - Cannot find FacesContext

    Hello,
    I am trying to load a popup window from my Visual Web JSF page. The popup window itself will be a Visual Web JSF page also.
    As an example, i have 2 buttons on my original page with jsp tags as follows::
    <webuijsf:button binding="#{Page1.button1}" id="button1" onClick="window.showModelessDialog('./PopupPage.jsp'); return false;"
    style="left: 19px; top: 16px; position: absolute" text="Button"/>
    <webuijsf:button actionExpression="#{Page1.button2_action}" binding="#{Page1.button2}" id="button2"
    onClick="window.showModelessDialog('./PopupPage.jsp');" style="position: absolute; left: 20px; top: 44px" text="Button"/>
    When i click Button1, the popup window appears but will not load the page within the window. I get the following report in the server log:
    StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: Cannot find FacesContext
    at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
    at org.apache.jsp.PopupPage_jsp._jspx_meth_f_view_0(PopupPage_jsp.java from :102)
    at org.apache.jsp.PopupPage_jsp._jspService(PopupPage_jsp.java from :77)
    ETC ETC
    If i click Button2 (which does NOT return false in the onclick Script and thus submits the first page) the first attempt fails with the same error, but if i try a second time the popup window displays and loads the page correctly.
    Any solutions would be greatly appreciated as this is driving me crazy :-s
    Edited by: coxy69 on Jan 9, 2008 10:29 PM

    Cannot find FacesContextThis generally indicates that you invoked a request which points to a JSP page which contains JSF tags, but that the request itself isn't passed through the FacesServlet. Make sure that the request URL is covered by the url-pattern setting of the FacesServlet in the web.xml.

  • Running Windows XP service pack 3. Updated Firefox from 8.0 to 9.0. Now when Firefox opens "The URL is not valid and cannot be loaded" is displayed in a window and no home page appears. What's wrong?

    Running Windows XP service pack 3. Updated Firefox from 8.0 to 9.0. Now when Firefox opens "The URL is not valid and cannot be loaded" is displayed in a window and no home page appears. What's wrong?

    That issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • I'm using Safari 5.0.5 on a 13" MacBook Pro and can't get Safari to fully load web pages or pictures on web pages. Any suggestions?

    I bought a MacBook Pro in October of 2010 and it's been running greatly up to this month. Now I am experiencing problems with Safari loading web pages. Sometimes it will load web pages just fine and other times it doesn't load web pages at all. This only seems to happen with certain sites. Also, on some web pages Safari won't load pictures (only the blue "?" is visible). I've experienced the same problem when I use the Mac App Store. In addition to these problems, when I visit sites that have problems loading, sometimes I just get a notice saying "Not connected to the internet" or "Safari cannot find the server." I am beginning to wonder if the problem could be some setting with my wireless router. I'm really hoping my MacBook hasn't gotten a virus. Any help would be greatly appreciated.

    Hi.
    Try putting these numbers in Network>TCP/IP>DNS Servers, for the Interface you connect with...
    208.67.222.222
    208.67.220.220
    Then Apply

  • I downloaded firefox 3.6.13 and now when moving through sites it will unexpectedly not be able to load a page within a site. How do I fix this problem or revert to a previous version of firefox?

    The first few sessions Firefox seemed to be running great with improved speed. Yesterday, when I opened Firefox it could not open my homepage even though I checked for my internet connection ... my email service was working perfectly. I rebooted the computer and started Firefox and the homepage opened fine. I then visited an online newspaper site opened from my bookmarks. I was able to read one or two articles on different pages, but then when I selected another page in this site, Firefox was not able to access it (just keep trying to make a connection to the page). I restarted Firefox and went into an online banking site, again through a bookmark. Again after successfully accessing several different pages in the site Firefox was unable to connect to a requested page.
    Later in the day I restarted Firefox, entered the banking site and successfully completed my transaction. Visited several other sites and had no problems, then again Firefox could not load a page.
    This problem has continued today when looking at the online paper.
    I would like either a fix to this problem, or to return to the previous version of Firefox.

    Google Toolbar Options, in the Search tab, make sure that '''Enable the Google new tab page''' is check-marked. If that doesn't fix it for you, see this for support information about the Google Toolbar. <br />
    [http://www.google.com/support/toolbar/?hl=en] <br />
    Or visit the Google Toolbar forum. <br />
    [http://www.google.com/support/forum/p/Toolbar?hl=en]
    As far as your UserAgent showing Firefox 3.0.11, see this: <br />
    https://support.mozilla.com/en-US/kb/Websites+or+add-ons+incorrectly+report+incompatible+browser
    You might want to consider getting rid of that '''desktopsmiley''' program that has messed up your UserAgent, it is known as Malware.

Maybe you are looking for

  • Open "Navigate" enabled report in new window - OBI10g.

    Hello Experts, May be its novice user question, i have 2 reports, source and target reports. Both reports are connected using "Navigate" functionality. Issue is, i wan to open the target report in new window? is that possible? using GO URL: we have a

  • New SAVE AS Dialog Box "Feature"

    What's up with the new feature that changes the name of the file you're saving... or exporting... to the name of the file you click on in the Save or Export dialog box? It's a terrible feature that causes more problems. One mis-click and you're savin

  • Has anyone got any form of .wmv to work on the Intel Macs?

    I need that codec and i cant seem to get flip4for mac to work. Can you explain how to do it if possible? Thanks, Alex

  • Validation on Mutliple select

    Hi I have one combo box and one list box. I am facing problem to select muttiple option values in List Box based on the selecting the combo box fields. So can any body tell me how to acheive the above problem. Can any body pls provide any code or gui

  • Pixeled photo slide shows

    I have come to the realization that it is not possible to make a decent looking slideshow in imovie without the image quality going to crap. What proffesional program can I use to make slideshows where I am able to time my music to my slides much lik