How to track exit from the PageFragment Lifecycle

Hi,
I have a requirement of keeping track of exit from a pageFragment.
My structure contains: a TaskFlow which contains a train . This train node contains the page Fragments. Now when i navigate from one PageFrag to another ie. when i exit the currently selected node having a page Fragment, i need to fire a logic.
I tried using creating a bean which implements RegionController interface which has refreshRegion(RegionContext ) method.I got hold of RegionBinding interface which has only one of the following values: Entry, Execute_Model, Prepare_Model, Refresh_Unknown, Render_Model and Type_executable_region.
Also in this case i am not exiting the TaskFlow during the navigation.
My doubt is how do i or can i use RegionController to keep track of exit from the currently rendered PageFragment's  Lifecycle.
Also , can i use PagePhaseListener to keep track of the PageFragment lifecycle stage. (My understanding is PagePhaseListener is to be used for Jspx not Jsff). Plz do correct me if i am wrong.
Thanks,
Prasenjit
Edited by: user586616 on Aug 31, 2009 3:54 AM
Edited by: user586616 on Aug 31, 2009 3:57 AM

Hi Frank,
I have created a ControllerClass which implements RegionController. I have registered the same as controller class in my pageFragments PageDef.
So, on navigation from one train node to another. due to post back call to leaving node and freshcall to the arriving node in the train flow. i am able to get the leaving as well approaching node.
My doubt is can i get similar or better control over the nodes traversed using trainModel or anyother adfinternal controller class? Kindly suggest any better way of getting handle to the navigating train nodes.
Sample Code which i have implemented:
public class RegionControllerBean implements RegionController {
public boolean refreshRegion(RegionContext regionContext) {
System.out.println("**********************************");
System.out.println("inside refreshRegion method call");
String selectedView = ControllerContext.getInstance().getCurrentViewPort().getViewId(); ------> this gives me the handle to the viewId of the curently selected pageFragment
System.out.println(ControllerContext.getInstance().getCurrentViewPort().getViewId().toString());
String pageName = selectedView.split("/")[2];
System.out.println("Current PageName:"+pageName);
System.out.println("name: "+regionContext.getRegionBinding().getName());
int refreshFlag = regionContext.getRefreshFlag();
if(refreshFlag == RegionBinding.PREPARE_MODEL){
System.out.println("Inside prepare Model phase"); ------> on entering of that node i need to call some logic before prepare_model phase
if(refreshFlag == RegionBinding.EXECUTE_MODEL){
System.out.println("Inside execute model phase");
if(refreshFlag == RegionBinding.RENDER_MODEL){
System.out.println("Inside render model phase");
// propagate refresh to inner binding container
regionContext.getRegionBinding().refresh(refreshFlag);
return false;
public boolean validateRegion(RegionContext regionContext) {
// propagate the validate to inner binding container
System.out.println("inside validate region method");
regionContext.getRegionBinding().validate();
return false;
thanks,
Prasenjit

Similar Messages

  • How do I exit from the "Star Wars" display?

    Hi all,
    I did my first Time Machine backup last night, and I think it went OK.
    Somehow, though, I hit the Time Machine icon during the backup, and I got into the "Star Wars" display. It wasn't showing me the progress of the backup, and it didn't show me when it was done. There was no way to get off this screen that I could find.
    How do you get out of the "Star Wars" display? (I didn't want to hit "ESC" because I wasn't sure if that would end the backup.) I'll be doing manual backups (this is for a MacBook Pro that won't be plugged into the external hard-drive all the time); I won't always have to sit with this "Star Wars" screen, will I?
    Thank you!

    The star wars screen and the process of backing up are two different things. The star wars screen is where you go to recover files, email, photos etc that have already been backed up. You don't have to be in this screen in order to back up because that happens automatically in the background. To exit, there is a cancel button in the lower left.
    Regards,
    Captfred

  • How to exit from the class execution process?

    I am invoking an exe from my Java application using the Runtime.getRuntime().exec() method.
    though the process is completed, the class is still running.
    how do i exit from the class execution, but with the process still running??

    To sabre150 :
    I am directly executing the command through the exec() method:
    Runtime.getRuntime().exec("...../iexplore.exe");This way, the control is going to the opened IE window and only on closing it, my class is exiting.
    Is there any other way where I can come out of the class, but ensure that the process which i run through the exec() method, is still running?

  • How to make the audio track independent from the video track?

    Can someone remind me how to make the audio track independent from the video track? My memory just went blank. Must be the age.
    Thanks

    Hi -
    Select the clip in the timeline.
    Type Command + L or go to the menu Modify > Link to toggle it off.
    MtD

  • How to exit from the button test in diagnostic mode

    Hi,
    I am having some trouble with my ipod 7th gen.
    First my lightning cable wont be recognize. show the error Accesory incompatible.
    I try to solve the problem cleaning the golden pins in the cable and in the ipod. Don't work
    I enter in diagnostic mode in my ipod and I get stucked in the button counter test..
    In the screen appear a mesage 'Please reset the unit to end'. I don't know how to reset the unit
    I press any button and only increase the counter for every button.
    First how acan exit from the button counter test and how can fix the issue with the lightning cable

    Your problem is that you are trapped inside an event case. It is not a good idea to run extended code inside event cases, else the event structure cannot service other events.
    Why don't you use the outer loop for everything? Now things don't step on each others toes. What good is an event structure if it cannot react at all times???
    Message Edited by altenbach on 07-25-2008 12:26 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    event_problemMOD.vi ‏17 KB

  • How do I exit from my email account back to the main menu page ?

    How do I exit from my email account back to the main menu page?

    In my previous post die should have been FIVE.
    Some day we might be able to edit posts on our iPad.

  • How can I exit from full-screen View?

    On the View menu, I clicked "Full screen View", but then I couldn't find any way back to normal view. I had to Force-Quit Firefox to escape.
    How do you exit from Full Screen View?
    (I tried Esc, Ctrl-C, and many other key combinations)
    Thanks, PeterR

    Try F11.

  • Portal logoff should Close or Exit from  the window

    Hi Friends,
    Please help me here, When user click on logoff or Exit from the portal the Window should be closed. (I disabled the popup message box , now I am trying to figured it out how to close the window)
    Please help me.
    Peter

    Hi Peter,
    If you try to write JavaScript  in par file to close window, i think portal will not properly logoff from portal.
    Better to create a seperate html page which contain script to close the window on load. Also include script to remove cookies created by portal (not mandatory). Save the html page in server..
    You can redirect portal after logoff to this page by setting ume logoff url in visual administrator.
    We implemented this in portal and working fine in IE. For Firefox it will prompt a message, since it will not allow close window from script due to security reasons.
    If you need html code and script let me know i will send it.
    Regards
    Baby

  • Conditional Exit from the script

    Hi,
    I have to code the script like the below
    --Step 1
    begin
    If <Table1 doesnot exist> then
    Display "User Defined Error Message: Table1 doesnot exit"
    EXIT FROM THE SCRIPT(Below sql should not run)
    endif
    end
    --Step 2
    spool abc.txt;
    select "should not run" from Table1;
    spool off;Step 2 should not run if table1 doesnot exist.
    Can someone please tell how to conditionally exit the script.
    Thanks & Regards,C
    CDPrasad
    Edited by: cdprasad on Aug 12, 2010 1:35 PM
    Edited by: cdprasad on Aug 12, 2010 1:36 PM
    Edited by: cdprasad on Aug 12, 2010 1:38 PM
    Edited by: cdprasad on Aug 12, 2010 1:38 PM

    Hi,
    David is right; SQL*Plus is the wrong tool for this job.
    If you really want to to this in SQL*Plus, you can achieve a crude type of branching by using sub-sripts. Instead of an IF statement, you use START or @ to run one or another of those sub-scripts, based on a substitution variable, which in turn is set by a query.
    For example:
    --     abc.sql - Test if table1 exists, and
    --                     (1) if it exists, run abc_query.sql to do a query
    --                     (2) if it does not exist, run abc_error.sql to display an error message
    --     Preliminary query, to define next_script:
    COLUMN     next_script_col        NEW_VALUE next_script
    SELECT     CASE      COUNT (*)
             WHEN  0  THEN  'abc_error'
                       ELSE  'abc_query'
         END     AS next_script_col
    FROM     all_tables
    WHERE     table_name     = 'TABLE1'
    AND     owner          = 'SCOTT'
    --     Now that we know what to do, do it:
    @&next_scriptYou would run the above script (abc.sql) and it would decide whether to run the script containing you query, or the script that prints an error message.
    Why does table1 sometimes disappear? In a good database design, tables are permanent structures, and get dropped only when they are obsolete. Perhaps you should be TRUNCATing the table, not dropping it.

  • HT3546 I can't figure out how to install bonjour from the CD that came with my airport express.  Can anyone help?

    I can't figure out how to install bonjour from the CD that came with my airport.  Can anyone help?

    If you are having difficulties installing Bonjour from the Installation CD, you can download the latest version of Bonjour from here.

  • HT1386 The first time I synced my iphone with my mac, I didn't realize that all of my photos from iphoto would transfer over to the phone.   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the

    The first time I synced my iphone 4 with my mac, I didn't realize that all of my photos from the iphoto library would transfer over to the phone (more than 3,000).   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the phone.  I tried to uncheck boxes and sync again, but I get a message that there is no room on the iphone.  I've read as many articles as I can find, but still cannot manage this.  Thanks for any help.

    Open itunes, connect iphone, select what you want, sync

  • How do we exit from a sub procedure

    Hi,
    I am calling a sub procedure from my plsql procedure. If an error occurs in the sub-procedure, it should exit from the appilcation.
    return gets the control back to the called procedure. but is there a way to stop the execution totally?
    Thanks,
    Narayan

    Raise an exception that is not handled in the sub-procedure nor in the main procedure.

  • In Mail 7.3 on my Retina MacBook Pro on OS 10.9.4, how can I type from the keyboard into a mail message using the Apple Symbols font?

    In Mail 7.3 on my Retina MacBook Pro on OS 10.9.4, how can I type from the keyboard into a mail message using the Apple Symbols font?
    When I select the Apple Symbols font from the list accessed from under Format/"Show fonts"/collection-all fonts/Apple Symbol, and then continue typing, I get normal letters, if in a slightly different font.
    How can I type using the Apple Symbol font?  I want to use that font to include keyboard and cursor selections of actual screen symbols to help write easily understood explicit computer lesson emails to my 92 year-old mom from a few hundred miles away.
    Steve

    In Mail 7.3 on my Retina MacBook Pro on OS 10.9.4, how can I type from the keyboard into a mail message using the Apple Symbols font?
    When I select the Apple Symbols font from the list accessed from under Format/"Show fonts"/collection-all fonts/Apple Symbol, and then continue typing, I get normal letters, if in a slightly different font.
    How can I type using the Apple Symbol font?  I want to use that font to include keyboard and cursor selections of actual screen symbols to help write easily understood explicit computer lesson emails to my 92 year-old mom from a few hundred miles away.
    Steve

  • How to download apps from the philippine app store

    how to download apps from the philippine app store. im here at the US and im using a US credit card

    You can't do that from outside the Philippines.
    (94063)

  • How to recover photos from the recycle bin ?

    how to recover phontos from the recycle bin or how to find them on icloud ??

    If you are using Photo Stream on your computer (Mac - logged into iCloud & Phtot Stream on / PC - installed iCloud Control Panel logged in and have Photo Stream turned on) then the photos you deleted should be safe and sound on your computer. Otherwise you may be out of luck.

Maybe you are looking for