How to programmatically Identify the Phase from a managed bean

How can we identify the Phase from a normal managed bean method ?
This managed bean method is a method activity in a task-flow. How can we identify the phase..?
If there is an event then, we can identify the phase using event.getPhaseId() but here there is no event. Can I get the phase programmatically ?
Thanks

Hi,
You won't need that with a PhaseListener. You could use something like the following:
public class CurrentPhaseListener implements PhaseListener
    private static ThreadLocal<PhaseId> currentPhaseId = new ThreadLocal<PhaseId>();
    public static PhaseId getCurrentPhaseId()
        return currentPhaseId.get();
    public void afterPhase(PhaseEvent ev)
        currentPhaseId.remove();
    public void beforePhase(PhaseEvent ev)
        currentPhaseId.set(ev.getPhaseId());
    public PhaseId getPhaseId()
        return PhaseId.ANY_PHASE;
}Regards,
~ Simon

Similar Messages

  • Programmatically closing a popup from a managed bean

    Hi,
    in the following blog [http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/|http://thepeninsulasedge.com/frank_nimphius/2008/02/14/adf-faces-rc-programmatically-closing-a-popup-from-a-managed-bean/]
    the following statement is being made at the end ...
    The JavaScript call is issued as "window.exitPopup()" because the script is called from the page root. You can easily see how the JavaScript can be modified to have "exitPopup" becoming a generic function avoiding hard coded popup ID's as in my example.
    I don't understand how to avoid hardcoded popup ID's. Could someone please explain this to me.
    Thank you
    Bodhy

    Hi,
    thank you. It is working.
    @Timo
    The closePopup function in your comment has the variable popupId. That made me wonder, if it is possible to set this variable in my jspx page.
    I made a workaround by defining a new variable called popupId with getter and setter methods and using the setActionListener to set that popupId. After that I was calling the closePopup() function. Do you know a better way doing this?
    @Frank
    I was also reading through Frank's blog about JavaScript [http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/|http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/] , trying to find a solution to call JavaScript functions with variables (defining these variables in my jsp page). Is this possible?
    Thank you
    Bodhy

  • How can we  identify the mails from the mails that have been read previousy

    Hi
    i m using java mail api to fetch the mails. but i am facing a problem that is every time i fetch all the mails in my application.
    Is there any way by which i can set a flag or something so as to i can identify the mails which have been processed earliar.
    please help me out.
    Dushyant Kumar

    POP3, right? See the JavaMail FAQ.

  • How can we identify the location from which a map is run, in the map ?

    Hi,
    I have a map that moves data from source system into the target system.
    I have two locations in the project (PROD_SOURCE and PROD_TARGET).
    My map picks the source table from PROD_SOURCE location and inserts into the target table in PROD_TARGET location.
    Now, this map can be deployed by changing the source location.
    In my map, I want to find out the location and subsequently the source database from which the map was run. This has to be inserted into a table
    Any pointers?
    -Pushkala

    You can always query the data dictionary in a pre- or post- mapping procedure.
    e.g.:
    select dep.owner, dep.object_name
    FROM PUBLIC_DEPENDENCY pd,
    all_objects dep,
    all_objects src
    where pd.object_id = src.object_id
    and pd.referenced_object_id = dep.object_id
    and dep.object_Type = 'TABLE'
    and src.owner = 'ERS_CTRL3X'
    AND src.object_name = 'TEST_MAP'
    AND src.object_type = 'PACKAGE BODY'
    will give me the listed owner of all tables referenced in this mapping. Knowing the table name, I would have access to the owner name. Now, whether you also will need to query agains all_db_links to see where a given db link is pointing to resolve the owner etc, or all_synonyms to resolve local synonyms to the db_link that they operate against etc I do not know. But tracing the dependancy tree from the current runtime copy of the package will get you to what you need.

  • Which SQL Server Edition support how many sessions to the instance from SQL Management Studio on the client side

    Hi,
    I'm looking for some help on the below query to verify which version of sql server edition supports multiple or N number of sessions to the SQL server Instance using the SQL Server Management Studio tool from the client side.
    SQL Standard Vs Enterprise.
    your urgent help is much appreciated.
    Br.

    Hello,
    See Maximum Capacity Specifications for SQL Server =>
    User connections = 32,767; and this value is independent of use SQL Server Version, edition or the used tools, like SSMS in your question 
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How do you identify the Logical system in start routine of a transformation

    My scenario is this.  I have five r3 systems that I am extracting from.   In the start routine of the transformation from the r3 data source to my data store I  am going to delete data and I need to know the source system id.    How do I identify the logical system or source system id in the transformation.  Is there a system field that contains this information.    I do not want to hard code the source system id in the routine.

    hi
    have a lool at tables rsreqdone and rsbkrequest with a join you should be able to determine the source.
    regards
    Boujema
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).
    Edited by: Boujema Bouhazama on May 9, 2008 12:04 AM

  • How can I copy the price from a reference invoice

    Hi,
    How can I programmatically copy the price from a reference invoice to the orders which I am creating using FM SD_SALESDOCUMENT_CREATE.
    Regards,
    Tanmay

    Hi,
    Try using the BAPI BAPI_SALESDOCU_CREATEFROMDATA1.
    In that pass REFOBJECTTYPE
    REFOBJECTKEY
    REFDOCTYPE
    to create from an invoice..
    Thanks,
    Naren

  • How can i identify the environment name or database name in the PL/SQL code

    Hi,
    I am using UTL_FILE to genearate the files.,
    My problem is, I have to design the common sql file , which can be executed in 2 diffrent environments ( Say QA & DEV ) , with no parameters. It has to identify the environment and based on the environment , it has to generate the concern files.,
    The only change needs to be incorporated is , file names , which will change based on the environment.,
    can nay one tell me , how can i identify the environment name or database name in the PL/SQL code ??
    Raja

    In this case, USEC_GI_DEV.NA.XXXNET.NET is a TNS alias. That alias exists only on the client machine. There is no way to access that information on the database server.
    You would have to find something in the v$database or v$instance table that uniquely identifies the database (and you may need some help from the DBAs to do this because you need to ensure that the data element you choose is compatible with whatever refresh process(es) are used in your environment).
    Now, if you are writing a stand-alone SQL*Plus script, SQL*Plus, as a client tool, does have access to the TNS alias in later versions. But that is a client-side determination, not a server-side determination.
    Justin

  • How can we remove the commas from the Formula value in SAP BW BEx query

    Hi All,
    How can we remove the commas from the Formula value in SAP BW BEx query
    We are using the formula replacing with characteristic.The characteristic value needs to be display as number with out commas.
    Regards
    Venkat.

    Do you want to remove the commas when you run the query on Bex Web or in RSRT?
    Regards

  • I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    Hold down the Option key while you boot your Mac. Then, it should show you a selection of devices. Click your flash drive and it will boot from that.

  • How do I move the pictures from my iPhone 4s to a folder on my computer?

    How do I move the pictures from my iPhone 4s to a folder on my computer?

    you will need to import your pics to your computer http://support.apple.com/kb/HT4083

  • How do i sync the songs from my iphone 4 to my laptop

    how do i sync the songs from my iphone 4 to my laptop it will sync photos and apps but wont sync songs i have bought

    The iphone is not a storage/backup device.
    The sync is one way - computer iphone.  The only exception is itunes purchases:  File>Devices>Transfer Purchases
    Copy everything from your old computer, or your backup copy of your old comptuer, to your new one.

  • How do i remove the songs from my iphone used to be easy with old version of itunes just unticked them but cant seem to find it any where on new version

    how do i remove the songs from my iphone used to be easy with old version of itunes just unticked them but cant seem to find it any where on new version

    how do i remove the songs from my iphone used to be easy with old version of itunes just unticked them but cant seem to find it any where on new version

  • How do I upload the contacts from my iPhone 5S to the Bluetooth device on my Toyota RAV4.  The car manual says to consult the phone's bluetooth instruction manual, but I don't have one.

    How do I upload the contacts from my iPhone 5S to the Bluetooth device on my Toyota RAV4?  The car manual says to consult the phone's Bluetooth instruction manual, but I don't have a manual for that.

    That is very strange... I wonder if it has something to do with the firmware or some sort of error. I haven't ran into this but at the shop I work at I've ran into several firmware errors on iPhone 4 all the way through the 5s. Maybe its something as simple as putting a different part of the code into iTunes... I know you can something of this extent. I would look up error 1669, I know you have tried a number of things but look it up on the forum and see what fixes are available so that you may be able to restore it properly without all this garbage you are running into. Just a thought for you.

  • Help Please..Until recently I have owed 2 iPod Classics - 2007 80gb and 2009 160gb (which has since been returned). How do I transfer the library from the 160 to the 80gb in iTunes using Windows Vista (ie merge the 2 libraries)? Thanks

    Until recently I have owed 2 iPod Classics - 2007 80gb and 2009 160gb (which has since been returned as it had a very noisy hard drive).
    How do I transfer the library from the 160gb  to the 80gb in iTunes using Windows Vista.
    Nothing seems to help on the Apple support pages, so any help would be appreciated
    Thanks

    Thanks for the reply, but not actually sure how to sync a second iPod with the library of the first, as I thought it would not recognise a new iPod for copyright reasons.
    Also, the files are in a location on the pc but I had to do lots of formatting amendments in iTunes as most of the stuff was on mp3 files and the formatting was all over the place. I did not want to loose any of the work by simply asking the new iPod to look at the original file and would rather copy en masse from one device to another.
    Any help or pointers greatly appreciated
    Thanks

Maybe you are looking for

  • How to pass the values to the WHERE-Clause in JClient ADF?

    Hi all, my JDeveloper Version is 10.1.2.0.0 (Build 1811) I need something like this: A Form with a Filter-Panel, and the Table-Panel EMP. In Filter: 1. DEPTNO as ComboBox with values from the DEPT table (not static values). The ComboBox should contai

  • Safari unable to locate microsoft download site

    Need help downloading Flip4Mac for Quicktime. Need this 3rd party for streaming music from local radio station. Had it before repairs being done to both G4 Desktop and G4 Powerbook. Get the following error message: Safari can't find the server. Safar

  • Adding new songs

    Ok guys need some help here please - with the idea of not creating duplicates & blocking some very necessary space...i added the songs to the media folder and unchecked the box - that said create a copy in the I tunes folder....now if i want to add m

  • Uninstalling Photoshop CC HELP NEEDED

    I installed photoshop and deleted but forgot to uninstall it and now it just sits in creative cloud when i need to reinstall it i dont know what to do someone PLEASE HELP ME.

  • I am having trouble opening links from websites I am currently on. The window will pop up but the content is blank. What should I do?

    I do not know if this is a result of something I did, or something that happened when I updated Firefox. Any help would be appreciated as I really need the windows to show the content I want to see. An example of what I am talking about: I was on Ver