Why is row currency not reset back in my iterator

Dear All,
Use case:
I am displaying my view object in an input form with navigation controls.
In a method I need to do some processing on some rows in an iterator and then after processing I need to return the row currency to the first row.
Please consider this code. I am calling this code in a button action listener. Upon clicking this button, I just wanted to process something on the rows of my iterator and after processing I wanted reset my form into the first row.
DCBindingContainer bindings =
  (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter =
  bindings.findIteratorBinding("MyIterator");
RowSetIterator rsi = iter.getRowSetIterator();
//Get the first row
Row firstRow = rsi.first();
String firstRowKeyString = firstRow.getKey().toStringFormat(true);
More Processing
//Return the row currency to the first
iter.setCurrentRowWithKey(keyString);
iter.refreshIfNeeded();
//PPR the formNot sure but, I cannot see my input form to return to the first row even if I PPR the form.
Anything missing? This is an ADFBC business interface.
Any thoughts?
JDev 11.1.1.6
Edited by: Neliel on Aug 15, 2012 2:22 AM

Filedropper is firewalled over here so apologies for not giving it a go but have you tried to do this, navigate to the first row in the rowsetiterator just before you ppr the page. Example:
public void handleCancel(ActionEvent actionEvent)
     FacesContext fctx = FacesContext.getCurrentInstance();
     DCBindingContainer bindings =
       (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
     DCIteratorBinding iter =
       bindings.findIteratorBinding("AllDepartmentsIterator");
     //clear the bindings
     Row rw = iter.getCurrentRow();
     OperationBinding getRowStatusBinding =
       bindings.getOperationBinding("getRowStatus");
     String rwStatus = (String) getRowStatusBinding.execute();
     if ("NEW".equalsIgnoreCase(rwStatus))
       iter.removeCurrentRow();
       iter.refreshIfNeeded(); //Remove this, you already do it after the if
     else
       rw.refresh(Row.REFRESH_UNDO_CHANGES);
     //set the row currency to the first row
     //iter.setCurrentRowWithKey(keyString);
     iter.refreshIfNeeded();
     RowSetIterator rsi = iter.getRowSetIterator();
     //retrieve the first row
     Row firstRow = rsi.first();
     //String keyString = firstRow.getKey().toStringFormat(true);
     //PPR the form
     UIComponent uiCOmponent = (UIComponent) actionEvent.getSource();
     while (true)
       if (uiCOmponent instanceof RichPanelFormLayout)
          break;
       else
          uiCOmponent = uiCOmponent.getParent();
     AdfFacesContext.getCurrentInstance().addPartialTarget(uiCOmponent);
}

Similar Messages

  • Why my program does not loop back during invalid input?

              boolean invalidNum = false;           
                      //Questionnaire Number
                        do {
                        System.out.print("Enter Questionnaire Number [ ] ");
                          try
                               inputQuestionnAireNum = Integer.parseInt(input.nextLine());
                               if(inputQuestionnAireNum <0 || inputQuestionnAireNum>100){
                                    System.out.print("Invalid: please enter between 1 to 100 \n");
                               } else {
                                    invalidNum = true;
                          catch (NumberFormatException e)
                            System.out.print("Invalid try again \n");
                        } while (!invalidNum);
                        //Age input
                        do {
                             System.out.print("Enter Age [ ] ");
                               try
                                    inputQuestionnAireNum = Integer.parseInt(input.nextLine());
                                    if(inputAge <0 || inputAge>100){
                                         System.out.print("Invalid: please enter between 1 to 100 \n");
                                    } else {
                                         invalidNum = true;
                               catch (NumberFormatException e)
                                 System.out.print("Invalid try again \n");
                             } while (!invalidNum);
                        //Postal code
                        System.out.print("Enter Postal Code [ ] ");     
                        inputPostCode = Integer.parseInt(input.nextLine());Result:
    1 new entry or 0 print1
    Enter Questionnaire Number [ ] w
    Invalid try again
    Enter Questionnaire Number [ ] 33
    Enter Age [ ] w
    Invalid try again
    Enter Postal Code [ ]
    why age input does not loop back and prompt for re-enter during invalid input ? instead it proceed to print the next line.

    Apparently because you don't reset "invalidNum" after the first loop.
    Your code would be a lot easier to read if you didn't use the word "invalid" to mean "valid".

  • Why does macbook pro not come back after closing shortly

    This has become really annoying. If I close my macbook pro (13 inch from this year...but not the retina) and then decide to open it back up without waiting long enough (maybe just setting it down and then picking it back up and opening it), it becomes a brick until I do a hard reset. Sometimes, if I open and close it over and over again, sometimes it will come back. My 2006ish mbpro never did that, so this is a big step back in my opinion, though, I don't know if it is OS or hardware.
    Anyone figure out a way to keep this from happening?

    Your MBP should, as I'm sure you know, just go to sleep when the top is closed and reawaken immediately when you open the top. This is obviously not happening.
    Which version of OS X are you running on your 2012 13" MBP? I would make sure that you've updated the system with the latest upgrades and, perhaps, run the Apple Hardware Test to make certain that it's not a hardware problem.
    Good luck,
    Clinton

  • Anyone know why TV shows are not importing back into iTunes from my backup file?

    My whole library was backed up on an external hard drive.  Something happened to my library on iTouch and everything was gone except for most recent purchases.  Also had new computer so downloaded iTunes again and went to import from my backup files.  Music imported but most movies, music videos, and all TV shows did not.  Also tried dragging files from backup folder to iTunes to copy but still did not work.  Anyone know how to fix this??

    iTunes: What are the iTunes library files?
    If your backup/restore includes the library files then information that isn't stored in tags, such as playlists & playlist membership, ratings, play counts etc. is preserved. Video Kind (Movie/TV Show/Music Video) is a property that isn't always stored in the tag. If you had restored the whole library (database files & media) then there would have been no need to import anything as you would have restored the database complete with all its information about your media.
    See this User tip for a recommended backup strategy.
    tt2

  • Why did my Mac not reset?

    I bought an Ipad 2 and I am currently in the process of selling my Macbook Pro which I have to ship out on Monday. I wanted to restore the Macbook to factory settings, but I am having some issues. I restarted and did the Command + R hold down to bring up the OSX Lion Utilities menu. I reinstalled Mac OSX on top of the current Hard Drive and let it sit there for seven hours while it downloaded everything. When I came back, I was greeted with the login screen where my old profile with my name and picture is still there for me to login to. I logged in and everything is the same.
    So what gives? What do I need to do to get rid of my profile on there and make it like it was when I first bought it?

    Do this:
    Install or Reinstall Lion from Scratch
    If possible backup your files to an external drive or second internal drive.
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Erase the hard drive:
    Select Disk Utility from the main menu and click on the Continue button.
    After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Erase tab in the DU main window.
    Set the format type to Mac OS Extended (Journaled.) Click on the Security button and set to One Pass and click on the OK button. Click on the Erase button and wait until the process has completed. This will take up to several hours depending upon the size of the hard drive.
    Quit DU and return to the main menu.
    Reinstall Lion: Select Reinstall Lion and click on the Install button.
    Note: You can also re-download the Lion installer by opening the App Store application. Hold down the OPTION key and click on the Purchases icon in the toolbar. You should now see an active Install button to the right of your Lion purchase entry. There are situations in which this will not work. For example, if you are already booted into the Lion you originally purchased with your Apple ID or if an instance of the Lion installer is located anywhere on your computer.

  • Why will my screen not turn back on after powering down iPhone?

    When my AT&GT 64gb iPhone 4s turns off, or dies, for some reason when I try to turn it back on, the phone itself turns on but the screen doesnt. Sometimes the screen will be a bright white, sometimes it will appear as if the LCD is cracked, and sometimes its just straight black. Eventually (like up to 12-15 hours later), I somehow manage to get it turned back on like regular, and it works fine (however occasionally, there is a white circle that surrounds the middle of the screen. Anyone have any clue whats going on with it? I'd just get the LCD replaced, but it only doesn't work when the phone turns off and back on, so i don't know if that would help at all.

    So u Have restarted it on the ipod?
    and you have turned it off and on?
    have you tried on your laptop or mac?

  • Why invoice currency not mandatory?

    Why is invoice currency not mandatory?
    For instance oinv.doccur is defined as nullable.  inv1 / rin1.currency too.  At the row level there are gaps in our data when zero amounts are entered.  You could argue that a zero amount has no currency yet there would be an intent of currency due to the parent oinv currency.
    Gaps in schema data become a pain (though small) at the reporting side of any system.

    Hi,
    B1 always look up document currency first. Unless you override with different currency in line level, it can be null.
    In your reporting, you need to use the same logic to check document currency first.
    Thanks,
    Gordon

  • Why are contacts I add on my phone not being backed up/linked to iCloud?

    I need to delete a previous employer outlook email account from my phone but don't want to lose all of my contacts.  I see most of my contacts show they are linked to both that outlook account and to the icloud.  I am assuming if I delete the outlook account I will still have the contacts backed up to the icloud?  Can someone please confirm this?  Second question is that I see quite a few contacts do not show a link at all to either outlook or icloud.  Will I lose those contacts?  It appears those contacts were created directly on my phone itself, so why are those contacts not being backed up to the cloud?  Appreciate any help you can give me so I don't lose contacts and/or have to enter them all over again (I did have my IT department give me a backup of my contacts on excel so worse care I can re-enter all of them but obviously I don't want to have to do that).  Thanks! 

    Did she restore the iPhone 4 and set it up as new wtih her AppleID?
    Or did she simply turn it on with your Apple ID still on it and start deleting everything?
    You should have Settings > iCLoud account as your AppleID.
    She should have hers.

  • PBS !!! JBO-35007 row currency has changed

    Hello,
    I have a simple DB Table Person with 2 columns "FirstName", "LastName" which are required (not Null).
    I create a VO "PersonQuery" based on a VE "PersonneEntity", this last one is associated to the DB Table "Person".
    So, i use a create form based on the VO "PersonQuery". When i commit my form with at most one field leaves "blank" (the field is required and the client validation is to false), after second commit, i have JBO-35007 row currency has changed... After, i can't commit the form with values for all fields, because jdeveloper has a wrong row key !!! I have an error for each field which is blank for jdeveloper !!!
    If the row currency token mechanism is be turned off through the pageDef for my page, by setting the EnableTokenValidation to false, my initial creation form isn't blank but associated with the first record of the DB Table.
    Thank for your help !
    Bob

    Hi,
    Ok, i don't ignore the validation error. By switching off client validation, i want to use the server side validation for required fields. So, by using the server side validation for required fields, i obtain JBO-35007 error after the second submit (no commit) of my form which contents blank field. In this simple case, i don't understand why the VO is out of synch with the data displayed on the screen.
    More, why the row currency token mechanism is be turned off through the pageDef for my page, by setting the EnableTokenValidation to false, my initial creation form isn't blank but associated with the first record of the DB Table???
    Bob

  • BufferedReader does not reset stream, unable to write more than one

    Hi,
    The following is a program that tries to read a file and write into 10 files.
    I am using bufferedReader.reset() to get to the starting position of the stream, but unfotunately it says mark not supported .
    Can anyone please tell me , why the stream does not reset, and do I have to close and then again reopen the input reader to write multiple times. Are there any other alternatives?
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    public class TestFile {
         public static void main(String args[]) {
              try {               
                                  FileReader fr = new FileReader("testinput.txt");
                   BufferedReader br = new BufferedReader(fr);
                   BufferedWriter out = null;                  
                   String line = null;
                   String name = "testoutput";
                   FileWriter fw = null;
                   for(int i=0;i<10;i++){     
                        String fname = name + i + ".txt";
                         fw = new FileWriter(fname ,false);
                         out = new BufferedWriter(fw);                    
                        while((line = br.readLine())!= null){
                             out.write(line);                         
                        out.close();
                        if(br.markSupported()){
                             br.reset();
              } catch (FileNotFoundException fnf) {
                   fnf.printStackTrace();
              } catch (IOException e) {               
                   e.printStackTrace();
    }Exception
    java.io.IOException: Stream not marked
         at java.io.BufferedReader.reset(BufferedReader.java:485)
         at TestFile.main(TestFile.java:30)

    but unfotunately it says mark not supported No it doesn't. It says
    java.io.IOException: Stream not marked
    No where in that code are you calling the method "mark" to set a mark and the API for reset says:
    Reset the stream to the most recent mark.And it says it throws an IOException
    If the stream has never been marked, or if the mark has been invalidated.

  • Air.swf getApplicationVersion() not calling back

    I am trying to use air.swf from
    http://airdownload.adobe.com/air/browserapi
    per the Adobe documentation to detect if an air application is
    already installed. I'm using getApplicationVersion but the callback
    function is never called. launchApplication() and
    installApplication() work fine.
    The code looks like this:
    _air.getApplicationVersion(appID, pubID,
    versionDetectCallback);
    function versionDetectCallback(version:String):void { do
    stuff }
    VersionDetectCallback() is never called. I de-compiled the
    air.swf and ran the code directly to try and figure out what's
    failing. But I get the same result. I can see the timer on the
    LocalConnection endpoint timing out after 5 seconds. I just can't
    figure out why the appinstaller is not calling back. The actual
    call (taken from the decompiled swf) looks like this:
    airappinstaller = new ProductManager("airappinstaller");
    var launchArgs:Array;
    launchArgs = ["-isinstalled", appID, pubID, "adobe.com" + ":"
    + lcName, "onApplicationVersion"];
    airappinstaller.launch(launchArgs.join(" "));
    where onApplicationVersion is the endpoint callback function
    and lcName is the LocalConnection name.
    It doesn't matter if I make the call from the Loader Init
    event or in a button click the callback function is never called. I
    am using Flash CS3.

    Hi Lisa,
    I am on windows yes,  and I seem to have got it working.  I found this problem to be very perculiar as there were many things my badge didnt like - such as a case statement instead of a load if if's.   anyway my solution is below,  although I must say, that now nothing happens if the user doesnt have air installed!  If they have Air installed but not my application, it will install my app but the need air installed first and that is not ideal!
    Maybe implementing your timer solution may help this?  Thanks for taking an interest!
    private var _toDo:String;
    private function onInit(e:Event):void
                _air = e.target.content;
                try
                  _air.getApplicationVersion(_applicationID, _publisherID, versionDetectCallback);
                catch (e:Error)
                  trace('air not installed');
                   root.statusMessage.text = 'Adobe Air not installed'
                   _toDo = new String("installAir")
    private function versionDetectCallback(version:String):void
                if (version == null)
                   trace('app not installed');
                   root.statusMessage.text = 'Coach Player not installed'
                   _toDo = new String("installApp")
                else
                   trace('app version ' + version + ' installed');
                   root.statusMessage.text = 'Application version ' + version + ' installed'
                   _toDo = new String("launchApp")
    private function onButtonClicked(e:Event):void
       root.statusMessage.htmlText = "onButtonClicked"
       if(_toDo == "installAir"){installAir()}
       if(_toDo == "installApp"){installApp()}
       if(_toDo == "launchApp"){launchApp()}
      protected function installAir():void
       root.statusMessage.text = 'Installing Adobe Air';
       _air.installApplication( _appURL, _airVersion, _arguments );
       //root.statusMessage.text = _appURL+" | "+ _airVersion+" | "+ _arguments
      protected function installApp():void
       root.statusMessage.text = 'Installing Coach Player';
       _air.installApplication( _appURL, _airVersion, _arguments );
       //root.statusMessage.text = _appURL+" | "+ _airVersion+" | "+ _arguments
      protected function launchApp():void
       root.statusMessage.text = 'Launching Coach Player';
       _air.launchApplication(_applicationID, _publisherID, _arguments);
       //root.statusMessage.text =  _applicationID+" | "+ _publisherID+" | "+ _arguments;
       //root.statusMessage.text = _arguments;

  • Help Problem NOT Solved Why have my system preferences suddenly started to reset back to default every time I reboot

    Why have my system preferences suddenly started to reset back to default every time I reboot At first I thought it was happening because I disconnected my Google account, but now I've disable that account and switched to Firefox.  I wasn't sure how my browser setting could have anything to do with my system preferences and now I think it's some glitch or missed setting that is causing the problem.  Oh & I locked my preference panel and that did not help.
    In addition to what I say above, not only are all my system preferences being reset to default, but also the preferences for word and Excel.  I'm sure it's affecting other programs, but Word & Excel are the main ones that I have a lot of custom setting for.  Especially annoying is the fact that my ribbon commands are reset.  All this started happening when I signed up for a Google Drive account.  The only system updates have been the usual security updates.  I deleted my Google account but haven't uninstalled it.  I'll try this, but I can't figure out how that would result in all OS preferences being reset.

    Here are a few more:
    "Data Rescue II" from prosofteng.com has a free download demo available.   You will need to follow/read the directions carefully. 
    VirtualLab™ Data Recovery  has a free download demo available.
    DriveSavers Data Recovery is NOT free.  However, they have a toll free contact phone #, international phone # & fax contact #'s. Also helpful Recovery Tips and Disaster Recovery for important precautions to prevent further data loss on their website.
    http://www.stellarinfo.com
    Stellar Phoenix Macintosh -- Mac data-recovery software -- recovers data from damaged, deleted, or corrupted volumes, and even from initialized disks. An exhaustive scan of the drive is performed to locate lost partitions. All found data in the lost partition is then presented in a tree structure so that you can copy your lost files to a working volume.
    *FREE* DOWNLOAD DEMO
    FileSalvage
    **FREE** Download DEMO
    Remo Recover
    **FREE** DOWNLOAD TRIAL

  • Why is my calendar not holding the correct color.  I have reset the color of a particular calendar posting and within second the color reverts to purple.

    Why is my calendar not holding the set color.  I have reset the color of a particular calendar and within seconds it reverts back to purple.  I am using ICloud on a calander linked to my IPhone and IPad.

    set them at icloud.com on a computer.  its a work around.  Peace, Clyde

  • Why does Leopard awaken but then not go back to sleep?

    I can understand that there is some process that wakes my Mac up in the middle of the night; Software Update, for instance. But what I do not understand is that if the preferences are set to put the Mac to sleep after a period of activity, and I can observe that the Mac stays asleep for at least that long when I manually put it to sleep, why doesn't it just go back to sleep by itself?

    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings                            
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       

  • TS4268 Why does my Imessage not take my Apple ID and password? it has me reset it to get in, but once reset imessage still rejects the password. It seems to randomly deactivate my Imessage

    Why does my Imessage not take my Apple ID and password? it has me reset it to get in, but once reset imessage still rejects the password. It seems to randomly deactivate my Imessage

    Try signing out and then back in again by going into Settings>Store>Apple ID:>Sign Out>

Maybe you are looking for

  • Win32 API error 126

    What to do if message: [Win32 API error 126 ("Dasangegebene Modul wurde nicht gefunden") when calling ::LoadLibrary from getFunction] apears

  • How to consider advance in APP

    Gurus, I have paid an advance through Down payment F-47 & F-48 i.e USD 5000.  Afterwards i have booked an invoice through FB60 i.e USD 7000.  Now i want to run APP.  Is it consider the advance, and paid the balance of USD 2000. How

  • Cannot Sync third party apps with DTM 6.0

    I just downloaded and installed DTM v6.0 and cannot find the area in which to set up third party (Add-ON) software for synchronization. Did they forget about this? Please help. Thanks

  • App Server 8.1 cluster not all members starting up.

    Hi, Solaris 10. Two instances of app servers, each in a separate zone, on same machine. App servers were just configured with the configure-ha-cluster command to operate in HA mode. When restarting the cluster with two members, only one of them comes

  • Help with Shared Photostream

    Hi guys! I could need some help with the shared Photostream function. I read the Q&A about it and i'm sure now that my shared Photostream albums wont delete by apple at anytime. Also i read about the Limits of Upload 1000 an Hour, 10.000 a Day. My id