Can you determine the current phase running?

Is there any API which you can invoke to tell you what phase the JSF lifecycle is currently in?
For example, suppose I have a backend bean, receiving JSF invocations. I would like to be able to tell what phase the JSF is in? for example restore views or render response?
Any help appreciated?
Thanks.

A google of your question reveals your question as result number 1 and the following as result number 2:
"JSF <= 1.2 does not provide access to the current JSF phase through the public API. Seam, however, maintains the current PhaseId in a ThreadLocal variable on the class org.jboss.seam.contexts.FacesLifecycle and exposes it through the following static method call: PhaseId currentPhaseId = FacesLifecycle.getPhaseId();"
"In JSF 2.0, the current PhaseId will be accessible from the getCurrentPhaesId() instance method on the FacesContext. "

Similar Messages

  • How can you determine the absolute path to a dynamically created NetStream object?

    We are trying to implement video captioning with a freeware component, ccforflash. This requires us to provide an absolute or relative path  to our NetStream object. How can we determine this path in Flash CS5 AS3?
    From the CCforFlashCS5 documentation:
    "2. Object name and path
    Type the name and path.  This is the instance name of the object with which CCforFlashAS3 will synchronize. It must be spelled correctly, since CCforFlashAS3 will query the object with this name for timing information in order to synchronize the captions. The path must also be included; either relative to the CCforFlashAS3 component (i.e. this.parent) or the absolute path from the main level of the movie (root)."

    It would be easier if the NetStream object was created on an easily identifiable place on the timeline. This player has an MVC architecture. The NetStream object is created in a subclass to Model class, which is itself a subclass of the EventDispatcher object. The View class access it via an interface.
    As you can guess, it's not that straightforward to determine where the NetStream object is located on the timeline. This is compounded by the fact that the NetStream object does not have a name property.
    I've tried methods like these, but they only work for the DisplayObject class:
    public static function displayObjectPath( avDisplayObject : DisplayObject ) :String
    var lvPath:String = "";
    do
    if( avDisplayObject.name ) {
    // var obj_name:String = (avDisplayObject.name == 'root1') ? 'root' : avDisplayObject.name;
    if (avDisplayObject.name != 'root1') {
    lvPath = avDisplayObject.name
       + ( lvPath == "" ? "" : "." + lvPath );
    } else {
    trace("displayObjectPath() NO NAME avDisplayObject="+avDisplayObject);
    } while( avDisplayObject = avDisplayObject.parent );
    return lvPath;
    } // displayObjectPath
    private  function showChildren(d:DisplayObjectContainer):void {
    trace("showChildren()");
    if (d.numChildren>0) {
    for (var c:Number = 0; c < d.numChildren; c++) {
    trace("showChildren c=",c," name=",d.getChildAt(c).name);

  • How to determine the current update level of the system

    How can we determine the current update level of the system. uname -a shows the release but how to obtain the update level through a program?
    I have this sample program to display the version
    #include <iostream>
    #include <sys/utsname.h>
    #include <dirent.h>
    using namespace std;
    int main()
      struct utsname osinfo;
      // Call uname to get system info, then extract strings.
      uname(&osinfo);
      if (osinfo.machine)  {
        cout<<" Machine : "<<  osinfo.machine;
      if (osinfo.sysname)  {
        cout << "\nOS Name : " << osinfo.sysname;
    if (osinfo.release[0] != '\0')  {
        cout<<"\nRelease : " << osinfo.release;
    }My aim is to check if the Solaris box is 5.10 update 4 or not.
    Edited by: nidhish9 on Nov 27, 2007 5:11 AM

    nidhish9 wrote:
    How can we determine the current update level of the system. uname -a shows the release but how to obtain the update level through a program?
    I have this sample program to display the version
    #include <iostream>
    #include <sys/utsname.h>
    #include <dirent.h>
    using namespace std;
    int main()
    struct utsname osinfo;
    // Call uname to get system info, then extract strings.
    uname(&osinfo);
    if (osinfo.machine)  {
    cout<<" Machine : "<<  osinfo.machine;
    if (osinfo.sysname)  {
    cout << "\nOS Name : " << osinfo.sysname;
    if (osinfo.release[0] != '\0')  {
    cout<<"\nRelease : " << osinfo.release;
    }My aim is to check if the Solaris box is 5.10 update 4 or not.
    Edited by: nidhish9 on Nov 27, 2007 5:11 AMIt's in /etc/release...
    essapd020-u004$ cat /etc/release
                           Solaris 10 8/07 s10s_u4wos_12b SPARC
               Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
                            Use is subject to license terms.
                                Assembled 16 August 2007
    essapd020-u004$ It can be processed with some simple commands:
    essapd020-u004$ cat /etc/release | head -1
                           Solaris 10 8/07 s10s_u4wos_12b SPARC
    essapd020-u004$ cat /etc/release | head -1 | cut -f2 -d_ | cut -c1,2
    u4
    essapd020-u004$ Best,

  • How do you import photos from a library on an external drive to the current library running in iPhoto?

    How do you import photos from a library on an external drive to the current library running in iPhoto? I have a few different pictures in each library and would like to have all my pictures in both libraries. The library on the external drive is my backup. I would appreciate any help.

    Depends on exactly what you want to do.
    Just move some of the Photos? FIle -> Export from one and export the shots to the Finder. Then import them to the other.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    Move the photos and all versions and metadata: use iPhoto Library Manager it's the only way to do this while preserving everything. Merge two Libraries into one?
    If you have Aperture 3.3 or later and iPhoto 9.3 or later you can merge libraries with Aperture.
    Otherwise the only way to merge Libraries is with the paid ($20) version of iPhoto Library Manager

  • Hi, Can you help me I am running an iMac 10.7.5 and iPad 6.0.1 and a macair10.8.2. iCloud is syncing emails and notes but not photos. Photo streaming is switched on on the iMac. what do I need to do to stream photos?

    Hi, Can you help me I am running an iMac 10.7.5 and iPad 6.0.1 and a macair10.8.2. iCloud is syncing emails and notes but not photos. Photo streaming is switched on on the iMac. what do I need to do to stream photos?

    Hi you have basicly 2 Options.
    1 -if you Switch One fotostream on all 3 devices of yours which are working on the same apple id -all Fotos you Take with your iPad will be synchronized via icloud to the other 2 decvices ( w-lan and battery depending).
    2- If you select foots or a whole album in iPhoto on your air or iMac and choose than puplish --> fotostream --> new or existing event you can key in a friends mail. If this friend has iCloud and iPhoto ( for iMac or MacBook ) and click on the link in the email it will download this fotos in the fotostream section in iPhoto. If he has a iPad, iPhone,... It will do it in the foto app and if he doesn't have a iCloud account at all and you choose "public web site" while publishing he can see your fotostream on a website.

  • Can you get the file name of the current executing TSQL script?

    Can you get the file name of the current executing TSQL script? I wrote entries to a generic log file and would like to include the script name.

    Okay, So What you can do is
    1. Read get the version from your  database and redirect it to a text file(SQLCMD outout can be directed to text file using -o option or windows redirection operator >)
    2. Now you can read this value from the text file either inside a batch file or a powershell script and decide what operations you can do. 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Can you change the theme color in iMovie for example from its current color of blue to red?

    Can you change the color of a theme in iMovie ?- example: the sports theme is set to be blue and I would like it red.

    No. And that would be nice in your type of example.
    I would recommend that you could TRY to use the "Map, Background & Animatics" earth icon> (next to transitions tool tab), scroll down> add RED background, and ADD Transitions inside some. That might help your example out.
    Hope this helps. Cheers

  • Can you play the guitar program and also run a keyboard at the same time using seperate outputs for both?

    I wanted to be able to play live on my electric guitar using mainstage and my keyboard player to use mainstage on the keyboard can this be done using the mainstage 2 on this computer?  Also if this can be done can you send the keyboard output and the guitar output seperatly to be able to be in different channels in the PA system?

    Hi
    Spatrick79 wrote:
    I wanted to be able to play live on my electric guitar using mainstage and my keyboard player to use mainstage on the keyboard can this be done using the mainstage 2 on this computer?
    Short answer: YES (but you will need to carefully consider how you organise your Patches with Guitar and Keys combinations, so that you both get the correct sounds at the same time)
    Spatrick79 wrote:
    Also if this can be done can you send the keyboard output and the guitar output seperatly to be able to be in different channels in the PA system?
    Yes, ideally using a multi-output audio interface. edit (with 2 outs for the guitar, and 2 for keys... you might also want another 2 pairs for monitoring)
    CCT

  • Can I find the current tab in Terminal using applescript?

    Running a script from the shell by prepending
    #! /usr/bin/osascript
    as part of my .profile, can I find the "current" tab using Applescript. Most of the time, the "current" tab will not be visible, as the shell is being initialised, or re-initialised.
    I want to set the dircolors for my shell by determining the background color of the tab in which the shell is executing.

    Under the Window menu you can activate any of the palettes that you want. In your case the Field tab is under the Object palette

  • How Can I Determine the Size of the 'My Documents' Folder for every user on a local machine using VBScript?

    Hello,
    I am at my wits end into this. Either I am doing it the wrong way or it is not possible.
    Let me explain. I need a vb script for the following scenario:
    1. The script is to run on multiple Windows 7 machines (32-Bit & 64-Bit alike).
    2. These are shared workstation i.e. different users login to these machines from time to time.
    3. The objective of this script is to traverse through each User Profile folder and get the size of the 'My Documents' folder within each User Profile folder. This information is to be written to a
    .CSV file located at C:\Temp directory on the machine.
    4. This script would be pushed to all workstations from SCCM. It would be configured to execute with
    System Rights
    I tried the script detailed at:
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/31/how-can-i-determine-the-size-of-the-my-documents-folder.aspx 
    Const MY_DOCUMENTS = &H5&
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(MY_DOCUMENTS)
    Set objFolderItem = objFolder.Self
    strPath = objFolderItem.Path
    Set objFolder = objFSO.GetFolder(strPath)
    Wscript.Echo objFolder.Size
    The Wscript.Echo objFolder.Size command in the script at the above mentioned link returned the value as
    '0' (zero) for the current logged on user. Although the actual size was like 30 MB or so.
    I then tried the script at:
    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27869829.html
    This script returns the correct value but only for the current logged-on user.
    Const blnShowErrors = False
    ' Set up filesystem object for usage
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    ' Display desired folder sizes
    Wscript.Echo "MyDocuments : " & FormatSize(FindFiles(objFSO.GetFolder(objShell.SpecialFolders("MyDocuments"))))
    ' Recursively tally the size of all files under a folder
    ' Protect against folders or files that are not accessible
    Function FindFiles(objFolder)
    On Error Resume Next
    ' List files
    For Each objFile In objFolder.Files
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:01", objFolder.Path
    On Error Resume Next
    FindFiles = FindFiles + objFile.Size
    If Err.Number <> 0 Then ShowError "FindFiles:02", objFile.Path
    Next
    If Err.Number = 0 Then
    ' Recursively drill down into subfolder
    For Each objSubFolder In objFolder.SubFolders
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:04", objFolder.Path
    FindFiles = FindFiles + FindFiles(objSubFolder)
    If Err.Number <> 0 Then ShowError "FindFiles:05", objSubFolder.Path
    Next
    Else
    ShowError "FindFiles:03", objFolder.Path
    End If
    End Function
    ' Function to format a number into typical size scales
    Function FormatSize(iSize)
    aLabel = Array("bytes", "KB", "MB", "GB", "TB")
    For i = 0 to 4
    If iSize > 1024 Then iSize = iSize / 1024 Else Exit For End If
    Next
    FormatSize = Round(iSize, 2) & " " & aLabel(i)
    End Function
    Sub ShowError(strLocation, strMessage)
    If blnShowErrors Then
    WScript.StdErr.WriteLine "==> ERROR at [" & strLocation & "]"
    WScript.StdErr.WriteLine " Number:[" & Err.Number & "], Source:[" & Err.Source & "], Desc:[" & Err.Description & "]"
    WScript.StdErr.WriteLine " " & strMessage
    Err.Clear
    End If
    End Sub
    The only part pending, is to achieve this for the 'My Documents' folder within each User Profile folder.
    Is this possible?
    Please help.

    Here are a bunch of scripts to get folder size under all circumstances.  Take your pick.
    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
    ¯\_(ツ)_/¯

  • How do you determine the optimal size for Mozilla Firefox?

    How do you determine the optimal size for cache in Mozilla
    Firefox? I am using Firefox 7.0.1 on a 64-bit Windows 7 Ultimate operating system with 3GB RAM and 300 GB hard drive, but I have other computers running Windows XP. If the answer doesn't apply to all current versions of Firefox on all supported Windows operating systems, please explain the differences. Is there a formula for calculating the best cache size?

    I found that the best idea is to let Firefox decide that itself.

  • IWork Numbers -- how to determine the current selected column/row?

    I am trying to write a script that grabs some text from a Numbers spreadsheet based on the selected field. I just can't figure how to actually get the column and row in a way I can use. Here's my start:
    tell application "Numbers"
    tell document 1
    -- DETERMINE THE CURRENT SHEET
    set currentsheetindex to 0
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of (tables whose selection range is not missing value)
    end tell
    if x is not 0 then
    set the currentsheetindex to i
    exit repeat
    end if
    end repeat
    if the currentsheetindex is 0 then error "No sheet has a selected table."
    -- GET THE VALUES OF THE SELECTED CELLS
    tell sheet currentsheetindex
    set the current_table to the first table whose selection range is not missing value
    tell the current_table
    set the range_values to the value of every cell of the selection range
    set therange to every cell of the selection range
    set thecol to column of first item of therange
    set therow to row of first item of therange
    end tell
    end tell
    end tell
    end tell
    It gives me a result like
    row "30" of table "table" of sheet "sheet 1" of document "Scheduler.numbers" of application "Numbers"
    but what I need is just "30" so I can use it for my scripts. I can't figure how to convert this to a string or some other useful format.
    Can anyone help? I like Numbers but I always run into little problems like this, something I can't figure how to do, compared with other scriptable programs.

    Search forGetSelParams or better for get_SelParams in the existing threads.
    I posted this handler more than 30 times !
    Yvan KOENIG (VALLAURIS, France) vendredi 18 mars 2011 17:03:05

  • Determining the current viewId

    Hi, I need to determine the current view id, therefore I am using the following code:
    /* adf-settings.xml */
    <adf-settings xmlns="http://xmlns.oracle.com/adf/settings">
      <adfc-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config">
        <lifecycle>
          <phase-listener>
            <listener-id>myPagePhaseListener</listener-id>
            <class>obasi.common.domain.myPagePhaseListener</class>
          </phase-listener>
        </lifecycle>
      </adfc-controller-config>
    </adf-settings>
    /* myPagePhaseListener */
        public void beforePhase(PagePhaseEvent pagePhaseEvent) {           
            try {           
                if (pagePhaseEvent.getPhaseId() == Lifecycle.PREPARE_MODEL_ID) {
                    for (Object child:FacesContext.getCurrentInstance().getViewRoot().getChildren())
                        if (child instanceof RichDocument)
                            System.out.println(FacesContext.getCurrentInstance().getViewRoot().getViewId());
            } catch (Exception ex)
                // ignore
        }But this doesn't seem to work accurately. Some viewId's are only "detected" after leaving a page...
    I noticed that this happens when the URL inside my browser also remains pointing to the previous page.
    Is there a way to solve this?
    Thanks in advance,
    Charles.

    Hi,
    Thanks for helping me out, Simon.
    I am not sure about what changes should be made to my web.xml in order to not have the resources as view id's.
    So here goes my web.xml - in the hope that you would be so kind to point me out where the problem lies.
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
        <description>Empty web.xml file for Web Application</description>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
        <context-param>
            <description>If this parameter is true, there will be an automatic check of the modification date of your JSPs, and saved state will be discarded when JSP's change. It will also automatically check if your skinning css files have changed without you having to restart the server. This makes development easier, but adds overhead. For this reason this parameter should be set to false when your application is deployed.</description>
            <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>RedirectToLogin</param-name>
            <param-value>login</param-value>
        </context-param>
        <context-param>
            <description>Whether the 'Generated by...' comment at the bottom of ADF Faces HTML pages should contain version number information.</description>
            <param-name>oracle.adf.view.rich.versionString.HIDDEN</param-name>
            <param-value>false</param-value>
        </context-param>
        <filter>
            <filter-name>JpsFilter</filter-name>
            <filter-class>oracle.security.jps.ee.http.JpsFilter</filter-class>
        </filter>
        <filter>
            <filter-name>trinidad</filter-name>
            <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
        </filter>
        <filter>
            <filter-name>adfBindings</filter-name>
    <!--
            <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    -->
            <filter-class>obasi.instel.customlogin.DynamicJDBCBindingFilter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>JpsFilter</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>REQUEST</dispatcher>
            <dispatcher>INCLUDE</dispatcher>
        </filter-mapping>
        <filter-mapping>
            <filter-name>trinidad</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>REQUEST</dispatcher>
        </filter-mapping>
        <filter-mapping>
            <filter-name>adfBindings</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>REQUEST</dispatcher>
        </filter-mapping>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>resources</servlet-name>
            <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>resources</servlet-name>
            <url-pattern>/adf/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>resources</servlet-name>
            <url-pattern>/afr/*</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>35</session-timeout>
        </session-config>
        <mime-mapping>
            <extension>html</extension>
            <mime-type>text/html</mime-type>
        </mime-mapping>
        <mime-mapping>
            <extension>txt</extension>
            <mime-type>text/plain</mime-type>
        </mime-mapping>
    </web-app>Please note that I am using Steve Muench's DynamicJDBCCredentials (http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html #129)

  • CS3 - Place Word document: How can I select the current preset?

    Hi
    In my Plugin I like to place a word document into a text frame. To do this I want select a defined preset before.
    How can I do that?
    How can I select the current preset for the placement (import)?
    Thanks for the support
    Hans

    Hi,
    I had posted a similar query few days back to place excel file in text frame. And I found out that, it is not possible to specify formatting option for any of microsoft document when using Indesign SDK.
    But we can do this by running script.
    If you are able to specify the formatting option through script, write code to get script object & execute this script through Indesign SDK.
    I was able to specify formatting option, sheet number, range etc through this.
    Hope this helps.
    Rajani

  • Can I use the current add-ons I have for CS5.5 extended?

    Can I use the current add-ons I use with CS 5.5 extended with the beta version of CS6 beta?

    Hi,
    What add-ons are you wanting to migrate? Plug-ins should work, with the caveat that the Mac version is 64-bit only for CS6. So if you were running the 32-bit of CS5.5 with a 32-bit plug-in, then that won't migrate. Panel extensions might need a small modification. Scripts should work unless they specifically target CS5.5.
    Are you having problems, or just trying to research before trying the beta build?
    regards,
    steve 

Maybe you are looking for