JSF and ADFBC: How to Run a method every time the page is posted back

Hi everyone,
I am using ADFBC and JSF in my project, and there is a page which runs the following logic: The page displays a set of radio options and a submit button. It has a total of 4 options, but they never display all at once. For example, when user enters the page for the first time, only selectItem 1 displays. When it clicks on the submit button, the page is posted back and hides the first select item, showing now the second, and so forth. The steps i did to achieve this are:
1 - Created a method on the App Module that inserts a row corresponding to the select item choice.
2 - Created another method that verifies which is the lastly entered row and returns a string containing the relevant attribute, for example, "E".
3 - Created the methodAction binding to run the insertMethod (1) and retrieveMethod (2).
4 - Created an invokeMethod executable for the retrieveMethod (2) and set the refresh property to "always".
5 - Created a variableIterator with a variable to hold the retrieveMethod return, also setting the refresh to "always".
6 - Lastly, bound the "rendered" attribute of each select item to the variable's value, for example "#{bindings.returnVariable == 'E'}
When i run the page, the logic works almost fine, except for one detail: When the user clicks the button that calls insertMethod, the page is posted back, and i assume the selectItems should be re-rendered accordingly. Yet, the button click inserts the row in the DB (called insertMethod) but keeps showing the previous radio item. If i restart OC4J, when i enter the page again the radio is now correct, showing the next option.
Do you know how can i tell the page that the model has been refreshed, so it runs the retrieveMethod again, alters the variable and the radio options without having to leave the page or restarting OC4J?
Thanks in advance for your help!
Regards
Thiago Souza

Hi all,
It seems i have figured out the error. It was a logic mistake on my method, ADF was doing the refreshes just fine. There is another little question i wanted to ask now: I need to execute a JSF Navigation Case when the page loads, in order to navigate to another page due to a certain condition. is there any way to run some logic to redirect the request before the page has been rendered, just like the onLoad() javascript event runs on the body every time it gets loaded?
What i'm trying to do exactly is this: When the login.jspx page runs the "success" navigation case, it goes to "page1.jspx". But before "page1.jspx" is loaded, i need to run an Application Module method to check for a certain situation; if this criteria is not met, i must run "fail" navigation case, from "page1.jspx" to "page2.jspx" without ever displaying page1.jspx.
Is it clear enough? Can you guys give me some pointers on how to do it?
Thanks a lot!
Thiago

Similar Messages

  • HT1311 I have tried this method but it seems that every time the region is set back to the original one as if I didn't change anything

    I have tried this method but it seems that every time the region is set back to the original one as if I didn't change anything

    Try it this way and see if it works. If you do not have a credit card registered to a legal address in the country in which you want to purchase, you will not be able to buy from that store anyway.
    Settings>iTunes and App Stores>Apple ID
    Tap your ID
    Sign out
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Settings>iTunes and App Stores>Apple ID
    Sign into your ID
    Tap your Apple ID after signing in
    Tap View Apple ID
    Enter your password
    Go to Country/Region to change the store.

  • How to call AMImpl method before loading the page(task_flow_config.xml)

    Hi experts,
    I have requirement like,
    I need to call AmImpl method, before rendering the page.(I heard like we can do it in task_flow_config.xml by using method_Invoke operation,But I am not sure about How it is going to work, also i need to know the implementation part,,,help pls )
    (I need to do in Task_Flow.)
    Inside that method I have some logic, where I will setting the BindVariable of my one ViewObject and I need to run the ViewOblect,So that DataShuold be available while page loading.
    I have some different logic after that,,,,
    can anyone suggest me for this??
    thanks
    Santosh

    thanks to Timo n TK,
    I have use case like,
    In the search page I have 2 LOV dropdowns say LOV1 and LOV2. Both list of values are created based on the independent View Objects based on the Query.
    LOV2 VO query is having the Bind Variable, for that Bind variable will be getting the value from the one of the AM method based on the user logged in.
    Also I need to display LOV2 dropdown in the page when user selects LOV1 as a 'SCM', for others it should be in hidden state.
    As per requirement I have to display LOV2 only for LOV1 value as 'SCM'. So I dont want to use valueChangeListner() for this.
    Instead I want populate LOV2 value before page rendering(because in that time i will be having all the parameter to populate ) by executing LOV2 VO Query.
    Once in search page user selects LOV1 as 'SCM', I should display 'LOV2' values in the dropdown.
    If i execute LOV2 VO in the AMImpl method say A() before page rendering ,then if user select LOV1 as 'SCM', will same data available in the dropdown (LOV2 dropdown is based on the LOV2VO)??
    Can u pls suggest me how can i render ,LOV2 when LOV1 as 'SCM' by using 'rendered' property without having valueChangeListner??
    pls suggest me the right approach as per my use case..
    waiting for reply,,
    Thanks
    Santosh

  • How to call a method when initialing the page?

    Help! I need to call a method to get some information from server to create a part of the page.
    But I don't konw what to do, Is there a function similar to the Flex's createComplete in JavaFX.
    please give me an example to show how to do that.

    DoStuff();
    Stage { scene: Scene { ... }}DoStuff() (or equivalent code at script level) will be executed first.
    You can also use the public override function run() function to ensure it is executed first.

  • Hi I've just download os x mavericks 10.9 on my macbook pro the trouble is when i am on the internet my screen goes of it keeps saying put in your password how can i stop this every time the screen goes to sleep

    hi I've just download os x mavericks 10.9 on my macbook pro  the trouble is when i am on the internet my screen goes of it keeps saying put in your password how can i stop this everytime the screen goes to sleep

    I don't know how you received an upgrade for iTunes.  You make it sound like it was sent to you.  At most your computer will tell you of a new version and you tell it to download it and install it.  However, a computer will not do this for a version which is incompatible.  iTunes 10.7 came out a few weeks ago but your computer would not notify you and even if it did, 10.7 would refuse to install on your computer.  So this part isn't making a lot of sense.
    Two ways to get the 'newer version' message.  One is to open your library on a computer running a newer version, and then try to open it with an older version.  Usually happens when the library is on an external and used with multiple computers.  The second way is if you have multiple versions of itunes installed on your computer.
    The newest (and likely the last) iTunes for OSX 10.5.8 is iTunes 10.6.3 which has been out for quite a while. 
    iTunes 10.6.3.25 - http://support.apple.com/kb/DL1575

  • I purchased bioshock 2 on the app store on my macbook pro (running lion) and it shows 'an error has occured' every time I try to download the app. How do I install it properly, I have restarted my mac and reset the app on the debug menu?

    I purchased bioshock 2 on the app store on my macbook pro (running lion) and it shows 'an error has occured' every time I try to download the app. How do I install it properly, I have restarted my mac and reset the app on the debug menu?

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select "/var/log/install.log" from the file list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar. Then select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, start over and note the time. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

  • I'm on Mac OS lion and since your new upgrade, the page loads of center, with no scroll bar. On every computer I run I have to resize the page for the page to load correctly. How can I fix this?

    I'm on Mac OS lion and since your new upgrade, the page loads off center, with no scroll bar, this happens on every computer I run.
    In order to have the page load correctly, have to manually resize the page.
    How can I fix this?

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    See also:
    *http://kb.mozillazine.org/Corrupt_localstore.rdf

  • I uninstalled Firefox once, reinstalled it and it ran. I had a problem so I did it again. Now it will not run and I get an error message saying that firefox is running and you can only run one at a time. I can't figure out what is running.

    Because of a problem, I uninstalled Firefox once, reinstalled it and it ran. I had a problem so I uninstalled/reinstalled it again. Now it will not run. I get an error message saying that firefox is running and you can only run one at a time. I have uninstalled multiple times and can't figure out what is running. The is only one Firefox installed and it is not open. What does this mean and how do I fix it?

    If you use ZoneAlarm Extreme Security then try to disable Virtualization.
    *http://kb.mozillazine.org/Browser_will_not_start_up#XULRunner_error_after_an_update
    See also:
    *[[/questions/880050]]

  • How to run a Concurrent Program from the back end?

    Hi,
    How to run a Concurrent Program from the back end?
    Is it Possible to see that Concuurent Request id which we run from the back end, in the front end?
    If yes, then Please Give reply how to write the code
    Thanks in Advance,
    Bharathi.S

    This is documented in Chapter 20 of the Application Developers Guide http://download.oracle.com/docs/cd/B53825_03/current/acrobat/121devg.pdf. These MOS Docs also have some information available
    221542.1 - Sample Code for FND_SUBMIT and FND_REQUEST API's
    235359.1 - How to Launch Planning Data Pull MSCPDP using FND_REQUEST.SUBMIT_REQUEST
    HTH
    Srini

  • How to run a job every month

    Hi guys,
    I know it's not right to ask others to create code for me, but I searched for a while and still blank. Can someone show me how to run myPackage.myProcedure every first day of the month (eg, Jan 1, Feb 1, March 1).
    I am thinking use this function, but I don't see how..
    DBMS_JOB.SUBMIT (
    job OUT BINARY_INTEGER,
    what IN VARCHAR2,
    next_date IN DATE DEFAULT sysdate,
    interval IN VARCHAR2 DEFAULT 'null',
    no_parse IN BOOLEAN DEFAULT FALSE,
    instance IN BINARY_INTEGER DEFAULT any_instance,
    force IN BOOLEAN DEFAULT FALSE);
    Any suggestions are welcome,
    Thank you
    Mike

    How come the first test works and the second test cannot find the procedure?? I am very confused now.. Also, how do I post code with indents? LOL
    SQL> DECLARE
    4 begin
    5 PRICE_PKG.CREATE_BUFFER_TBL;
    6 end;
    7 /
    PL/SQL procedure successfully completed.
    SQL> DECLARE
    2 v_Job NUMBER;
    5 BEGIN
    6 DBMS_JOB.SUBMIT(
    7 v_Job,
    8 PRICE_PKG.CREATE_BUFFER_TBL,
    9 LAST_DAY(SYSDATE)+1,
    10 TO_CHAR(TRUNC(LAST_DAY(SYSDATE)+1) + (6/24))
    11 );
    12 END;
    13 /
    PRICE_PKG.CREATE_BUFFER_TBL,
    ERROR at line 8:
    ORA-06550: line 8, column 36:
    PLS-00222: no function with name 'CREATE_BUFFER_TBL' exists in this scope
    ORA-06550: line 6, column 4:
    PL/SQL: Statement ignored

  • Creative Cloud locked up and had to Uninstall. Upon reinstall it initializes and downloads 2/3 but then stops every time. How to remedy this?

    Creative Cloud locked up and had to Uninstall. Upon reinstall it initializes and downloads 2/3 but then stops every time. How to remedy this?

    After running cleaner tool, follow below steps :
    End all Adobe process from Task Manager .
    1) Open Control Panel and Navigate to Control Panel\Programs\Programs and Features .
    Under Program and Features list,If present remove Adobe Creative Cloud option.
    2) Open C:drive and navigate to C:\Program Files (x86)\Common Files\Adobe.
    Open Adobe folder and delete folders named Adobe Application Manager and OOBE.
    3) Navigate to C:\Program Files (x86)\Adobe.
    Open Adobe folder and if present delete Adobe Creative Cloud folder.
    4) Press Windows button (located between Ctrl and Alt buttons) along with R button together at a time , you will get a run command window.
    Type in below command and hit 'Enter' key.
    appdata
    Then navigate to Local>Adobe.
    Open Adobe folder and delete folders named AAMUpdater and OOBE.
    5) Click on the below link and download Adobe Application Manager and install the same.
    Once the installation process is completed , it will create shortcut icon on Desktop.
    Double click on it and update, it will get updated to Creative Cloud :
    http://download.adobe.com/pub/adobe/creativesuite/cc/win/ApplicationManager9.0_all.exe

  • I am trying to print a PDF file to a legal size paper and I would like for it to fill up the page. How do I do this? I went into the settings and changed it from letter to legal, but it's still printing out the same size. Can someone help me, please?

    I am trying to print a PDF file to a legal size paper and I would like for it to fill up the page. How do I do this? I went into the settings and changed it from letter to legal, but it's still printing out the same size. Can someone help me, please?

    Are you trying to Print to PDF or are you trying to Print a PDF file to a physical printer?

  • I have forgotten my password and my iphone is disabled. I have tried to resetting it but every time the time is up and i think it will work it says "can't connect to iphone because password is on" how do reset my iphone 5?

    I have forgotten my password and my iphone is disabled. I have tried resetting it but every time the time is up and I think it will work, it says "cant connect to iphone because password is on" how do i reset my iphone 5?

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • I updated my Itunes to the latest version(11.1.4) and it isn't running on my laptop. The current OS is a W7 ultimate 64bits, when i try to run it, opens a message box with the following error message: error 7 (windows error 1114) . What should I do?

    I updated my Itunes to the latest version(11.1.4) and it isn't running on my laptop. The current OS is a W7 ultimate 64bits, when i try to run it, opens a message box with the following error message: error 7 (windows error 1114) . What should I do?

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • I updated my iPod Touch to 6.0.1. after much prompting. Now my music is gone! (along with apps, photos and podcasts). After syncing a bunch of times some of it came back, but not all of it. How odd is that? How can I get my music back on it??

    I updated my iPod Touch to 6.0.1. -- after much prompting from iTunes. Now my music is GONE (along with apps, photos and podcasts). After syncing a bunch of times some of it came back, but not all of it. How odd is that? How can I get my music back?? I'm really bummed! Everything shows in iTunes, but it's not synching right. So glad I updated. NOT.

    Go to iTunea>Preferences>Devices and see if there is a backupright at the time you did the update. Then try restoring from that backup. If the apps are in your iTunes library, any app data will be restored to the iPod.
    When restoring from an iOS 4 (or later) backup, if the device had a passcode set, iTunes will ask if you want to set a passcode (and remind you that you had protected your device with a passcode). iTunes will not ask you to set a passcode when restoring from iOS 3.x and prior backups.
    Therefore, remembe the passcode that you enter this time.
    It appears that if you restore from a backup, that backup is not subseqyently overwritten by the next backup.

Maybe you are looking for

  • Assigning a value to a parameter.

    Hi all, I am using CR XI, developping a report built upon a query in BW (using SAP Kit). The query in BW has a parameter PARAM1 of type string that comes automatically into my report but the type or the parameter is greyed. I can't change it. In real

  • MACBOOK - battery or power adapter???

    Hi! Im new user of Mac, I use my laptop as a desktop. Do I run it on battery and just recharge after every discharge? or do I use AC power the whole time with my battery in the Mac? Or should I remove the battery while using under AC, with my old lap

  • Warning in update statistics in db13

    HI all, in my prd system (HP-ux, oracle 9.2, sap 4.7 ). i got warning msg in update statistics in db13.   like  " BR986W Index SAPCRP.SMW0REL~0 is unbalanced - please rebuilt the index." how  to solve this problem. Regards, sk

  • Using a PDF

    A client has sent me a PDF (Adobe Acrobat) file to use in a video. What should I convert it to and at what resolution to maintain highest quality? Thanks.

  • How to undo the last import

    Can I delete the "last import" in iphoto after I have transferrd photos from pictures on my imac to the iphoto library?  If I delete the pics, will it undo them?  Wll it remove the pics from the iphoto library?