Iterator refresh after commit

Hi,
I have three tabs in my page , and in each tab , i have separate taskflows.
The first tab taskflow contains a jsff which has lets say master table iterator i.e departments iterator.
In the second tab, i have a table based on read only query, but when i click on add button, i will be inserting in to detail VO (employee VO) and using postChanges() .
so that read-only query based table gets the new data.
now when i click on save button and commit , the iterators in taskflows of tab1, tab2 are pointing to first record rather than the current record.
1) even i tried with having an action for the 'save' button and navigating to method activity which sets the iterator to current row.
When i am returning back to taskflow,i am still seeing the iterator pointing to first record rather than the current record i intend to see.
could anybody tell me why iterator is pointing to first row after commit()
i don't have 'refresh' -- if needed for taskflows. its default.
for transactions, datacontrols, its default for my taskflows.

I generally retain the previously selected row using the following code in my VOImpl after every executeQuery().
public void executeQuery()
// current row key if any
Key currentRowKey = null;
Row currentRow = getCurrentRow();
if ( currentRow != null )
// get current row key
currentRowKey = getCurrentRow().getKey();
// super call
super.executeQuery();
if ( currentRowKey != null )
// set current row now using previously stored key
Row[] rows = findByKey( currentRowKey, 1 );
if ( rows != null && rows.length == 1 )
setCurrentRow( rows[0]);
}

Similar Messages

  • ADF Region not getting refreshed after Commit

    Hi everyone!
    I'm having some trouble with a region that is disturbing me for more than 2 weeks, its true guys, I tried everything!!
    My parent page is a normal ADF .jspx page that contains inside it a task-flow call. The first task-flow activity is a router, after sending a String
    to router it chooses the region activity that fits the page (in this example I always pass the same value, same String).
    After the router is called then it delegates to "ExecuteWithParams" method call before calling my final region that have its query executed with
    parameter set inside task-flow.
    The region is refreshed (refresh="ifNeeded") when I change row inside a table in ParentPage, all fine here.
    The problem is:
    - After any Commit (with navigation case or executable binding) is issued inside Region the region save its state and does not refresh anymore, even if task-flow parameters change.
    Already tried CacheResults="false" on iterator too.
    I'm using Jdeveloper 11.1.2.1.
    Thanks in advance!!

    Hi,
    so I think the shirt summary of your problem is that an ADF region doesn't refresh after it issued a commit. Sounds like a bug to me if this reproduces in a test case. Do you have a testcase based on the Oracle HR schema ? If so, send it my way in a zip file you rename to ".unzip". My mail address is in my OTN profile. Note that bugs I file are not visible to customers. So if you need to keep track of any state of the issue, you need to file a service request with support yourself.
    Frank

  • Browser does not allow page refresh after Commit!

    Hello everyone, I am using JDeveloper 11.1.2.3.0
    I am having a big problem here. I create a simple page and insert a form, a createInsert button and a commit button for example. I run this page and everything is fine. I create a new record, fill the form fields and then commit. In this moment if I press F5 to reload the page, the browser asks me for confirmation "To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier." I don't understand why it has to repeat any action, I checked for dirty transactions after the commit operation and transactions are clean. If I move from this page to another and back to first it works fine, F5 refreshes without problem.
    If I have a table with multiple rows and I update first row for example, and then click the third row and then perform a refresh (Confirm on above message), the third row will obtain the obtain all the information of the first row...
    Does anyone know how to deal with this problem?

    Ok I found the real problem and solution to this. As I said reopening the page does not bring any problem, but only hitting F5 does. My 'submit' and 'commit' buttons had 'partialSubmit=false' which should perform a total page submit in this case. Apparently this is not "detected" by the browser when pressing F5 although submission is performed. Changing 'partialSubmit=true' to the buttons did the trick. Tung

  • VO refresh after commit not working

    I have a complete Master-Detail functionality ( query, update and create ) implemented.
    I have created 3 pages for this.
    SearchPG
    UpdatePG
    and
    CreatePG
    In the SearchPG I can search for the Master rows and have an update link for every record.
    When the user clicks on the link the UpdatePG opens with the Master and Detail VOs and they can edit and save both VOs.
    On saving, I return to the SearchPG displaying a message.
    I also have a Create button on the SearchPG to create new records.
    On clicking, it opens the CreatePG with both the Master and Detail VOs and the user can create 1 Master and multiple Details records and save the data.
    On saving, I return to the SearchPG displaying a message.
    I have a very peculiar issue here.
    The first time when I create the record and then return to the SearchPG if I try to update any existing records I get a blank page on the UpdatePG.
    If I close the screen and reopen it works fine. The new data gets created. There is no problem if I use only Update functionality throughout one session.
    This is an issue only when I create and then try to update any record.
    After I create new records, the Search query works fine. It is only the Update not working immediately after create.
    I use the same VOs. MasterVO and DetailVO for both same Create and Update fucntionality. I thought it might be a caching issue so
    I tried to use immediately before the actual update in
         vo.reset();
         vo.clearcache();
    But it is still not having any effect.
    Any assistance is appreciated.

    I believe when you are creating the row, its not actually getting saved . Hence when you are querying its showing the value as zero.  Could you please paste in your code here , so can pass our inputs .Please try to commit the trasaction
    public String commit() {
        try {
      XxEmployeeVOImpl employeeVO = getXxEmployeeVO1();
      XxEmployeeVORowImpl row = (XxEmployeeVORowImpl)employeeVO.first();
      String savedEmp = row.getEmpno().toString();
      getOADBTransaction().commit();
      return savedEmp;
      } catch (Exception e) {
       e.printStackTrace();

  • Refresh only current row after commit, when ChangeEventPolicy set to none

    Hi,
    I'm using jdeveloper 11.1.2.3.0
    I'm editing a table with a popup, I set the ChangeEventPolicy to none because it made some problems.
    Now I would like to know, when i'm closing the popup and doing commit,
    how could I refresh only the current row, and not whole the table?
    I would like it to work as with ChangeEventPolicy set to ppr.
    Thanks!

    could you please explain a little bit more?
    When I used the ChangeEventPolicy with ppr it looks like only the selected row was changed after commit.
    but with PartialTrigger i see that it's refreshing all the table.
    are you sure they are working the same?
    what about row.refresh(..), is it only used for rollback?

  • Lov iterator refresh issue

    HI friends!
    I'm using JDeveloper 11g
    I've got a problem with a lov attribute in my application.
    I need to implement the following scenario:
    I have an adf table Licence in my jsf page. One of the table columns includes a lov attribute which values must be selected from a list box (a list data source is LicenceProducer lov view object).
    If there is no required licence producer in the drop down list we can trigger a pop up dilaog (kind of lov dialog) and create a new one row in the data source iterator.
    Then the required attribute value of the newly created row must be passed to the list in the source jsf page and become a currently selected value for the lov attribute of the Licence VO.
    SO i've have implemented almost the whole scenario:
    1. created an appropriate lov attribute in Licence VO with LicenceProducer VO as a list data source
    2. created a bounded adf task flow which is resonsible for displaying the pop up lov dialog with all insert/commit/return new value functionallity.
    Everything works just greate except that the lov iterator is never refreshed after returning from the pop up dialog.
    The updated content of the list box is only seen after reloading the source jsf page. Setting partial page rendering (for the Licence adf table) on returning from the pop up dialog does't work.
    I saw a number of posts on this issue but never found any good solutions.
    I think that i must somehow get an access to the lov iterator (data source vo) wich is not the same as the base LicenceProducer view object and refresh it programmatically.
    PS. if i brought my issue in a not sufficiently clear way. please answer the quite simplier question. Is it possible somehow to add a lov functionallity with the possibility to add new rows into lov iterator?
    Thanks in advance. Alex.

    Thanks friends.
    It is so greate to see somebody notice your question and even have the similar problem.
    First to Paul
    1. Yes I have a model driven LOV, i.e. i defined the lov functionalty for the attribute in a VO.
    2. I'm using JDeveloper 11g as you might be using.
    3. Actually i'm afraid i have not fully understood your approach with a row impl class. AS i could notice there were no worthy changes added into the row impl class after i had redefined VO's attribute to use a lov view object.
    it would be greatly appreciated if you let me know more detail about your solution.
    By the way i have noticed one interesting thing as I was experimenting with my issue. It turned out that the lov iterator refreshes just excellent on returning from a pop up "manually created lov dialog" after i click a rollback button of the data control
    where the VO iterator containing the attribute with the lov functionalty exists. Give it a try and you'll see, no other standard operation button gives the same effect!!!!! I realized it accidentially myself.
    To Hasim
    if i understand you right your assumption is to refresh a row iterator which is the basis for the lov attribute and then refresh a page element where the lov attribute has been dropped?
    If so than i've tried it because this is the first thing comes into mind. But it doesn't work, i think that this basis iterator we select for the list of values of the required attribute in VO is not the same as a real list Datasource iterator...
    If i understood you wrong please give me know and explain please your approach. Your opinion is interesting for me.
    I address our experts ones again with a rather simplier question. Is it possible to create a model driven lov attribute where it would be possible to insert new rows into the list of values during the ongoing user session?
    Alex.

  • Sender agreement not updated in XI cache after commit

    Hi all,
    somehow none of my created sender agreements appears in the XI cache after commit. I also did a complete refresh of the XI chache.
    Any ideas?
    Thanks!
    Denis

    Hmm,
    I have created sender agreements for SOAP channels, this would explain why I could not see the agreements...
    Actually I am wondering why the 'test configuration' tool in the ID brings up an 'java.io.IOException' in the receiver determination. Prior to that the sender agreement lookup fails. So I thought it's the XI Cache...
    I restarted the J2EE engine but the problem remains.
    Any other ideas?
    Thanks so far!

  • Problem with a field set to refresh after insert at Row level

    hello all,
    i have a problem with a field (a serial) which is set by a db trigger at insertion. The field "refresh after insert" is properly set in the Entity and everything is refreshed correctly when i insert data via an adf form in a jspx but when i want to insert programmatically nothing is refreshed. I insert data this way :
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    newRow.setAttribute("mandatoryAttribute1",value1);
    newRow.setAttribute("mandatoryAttribute2",value2);
    <more init here but not the serial since it will be set by the DB trigger>
    insertVO.insertRow(newRow);
    but when i want to get back the value with "newRow().getAttribute("TheSerial");" i always get a null back and not the value set by the db trigger.
    One way to get the serial is to commit after each insert but i don't want to commit between inserts.
    i've tried to unset the refresh after insert and override the createDef() method to setUseReturningClause(false) as it's is advised in chapter 26.5 of the ADF 4GL dev. guide but in this case i have an exception JBO-29000: JBO-26041.
    How can i get the value back properly ?
    thanks
    -regards

    The data for the newly created row doesn't get inserted into the database until the commit is executed, so the insert trigger isn't called.
    If you need to get the value without committing, then you should implement the trigger programmatically and drop the trigger from the database. The code below shows how you could do this.
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    SequenceImpl seq = new SequenceImpl("MY_SEQ", insertVO.getDBTransaction());
    Long next = (Long)seq.getData();
    newRow.setAttribute("primaryAttribute", new Number(next));
    ...You will need to replace MY_SEQ and primaryAttribute with the correct values for your example, but this should acheive what you want.

  • Get the  DBSequence after commit?

    Hi,
    After insert and commit a record, how to know the new DBSequence number?
    Is there a way to read the last row inserted?
    myService.getTransaction().commit();
    Here....how to get the row?
    Thank you

    Jamil
    OK, if you use a trigger to populate a field on insert or even to change a value on update of a record, you can tell the entity object that certain fields will need to be re-queried by after the DML operation has completed.
    This is simply done by opening the GUI definition of the Entity Object, selecting the appropriate attribute (in your case ID), then on the right hand side of the screen, you will see 'Refresh After' with the options of 'Insert' or 'Update'.
    Just click on insert and that should be all you need to do. BC4J will look after this for you now...
    Cheers
    Chris

  • [Solved] ADF BC - Correlation of Refresh After Update checkbox with Returni

    Hello all,
    As per JDev (10.1.3.3.0) help system Refresh After Update option is used when there is Before Update trigger on a table.
    As far as I know ADF BC framework is using Returing clause of an Update statement to implement Refresh After Update option.
    First of all I created the following objects in Oracle DB 10.2.0.3.0:
    CREATE TABLE TAB1
         ID          NUMBER          PRIMARY KEY,
         EDITED_AT     DATE,
         VALUE          VARCHAR2(64)
    CREATE SEQUENCE S_TAB1
         INCREMENT BY 1
         START WITH 1;
    CREATE TRIGGER T_TAB1_BIE
    BEFORE INSERT OR UPDATE ON TAB1
    FOR EACH ROW
    BEGIN
         IF INSERTING THEN
              SELECT S_TAB1.NEXTVAL INTO :NEW.ID FROM DUAL;
         END IF;
         :NEW.EDITED_AT := SYSDATE;
    END;
    /Taking into consideration aforesaid I tried to do the following in SQL Plus:
    SQL> insert into tab1(value) values('ddd');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select * from tab1;
            ID EDITED_AT           VALUE
             1 27.03.2008 17:01:24 ddd
    SQL>
    SQL> declare dt date; val varchar2(64);
      2  begin update tab1 set value = 'ddd' where id = 1 returning edited_at, value into dt, val;
      3  dbms_output.put_line('txt = ' || dt || ', ' || val);
      4  end;
      5  /
    txt = 27.03.2008 17:01:24, ddd
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from tab1;
            ID EDITED_AT           VALUE
             1 27.03.2008 17:02:12 ddd
    SQL>As it can be seen Returning clause of an Update statement does not return a new date, i.e. 27.03.2008 17:02:12, that was updated by the trigger, it returns an old one - 27.03.2008 17:01:24.
    Should I change any parameter in Oracle DB or what can I do that ADF BC refreshes values generated by a Before Trigger?

    Yerzhant,
    Something is certainly not right. I don't have a 10.2.0.3.0 instance handy at the moment, but I tried verbatim your example in 11.1.0.6.0, and it works properly.
    I am using this capability all over the place in ADF BC with no problems, database versions from 10gr1 to 11gr1.
    Perhaps time to contact support.
    John

  • Bc4j bug at refresh after insert / update

    having a table and a trigger on it that fills an attribute
    in a 9i db. one can take the scott/tiger emp table and use the
    following trigger:
    create or replace trigger t_bri_emp
    before insert on emp
    for each row
    declare
    v_no number(7,2);
    begin
    select user_SEQ.nextval*100
    into v_no
         from dual;
    :new.sal := v_no;
    end;
    then creating a bc4j project with an entity object based on this table (emp)
    and a view object based on the created entity object.
    !!!! when you create the bc4j project you must set the SQL Flavor to SQL92 or OLite
    when you set the attribute settings, for the attribute the trigger is on (sal),
    to refresh after insert / update or both in the entity object you get a
    null pointer when you try to insert a new row and commit.
    java.lang.NullPointerException
         oracle.jdbc.ttc7.TTIoac oracle.jdbc.ttc7.TTCAdapter.newTTCType(oracle.jdbc.dbaccess.DBType)
         oracle.jdbc.ttc7.NonPlsqlTTCColumn[] oracle ....................
    all can be reproduced just useing the wizard and start the bc4j project with the tester
    any workaround ??

    Sven:
    I looked into your issue. It turns out your problem is caused by a bug in the system (bug #2409955).
    The bug is that for non-Oracle SQLBuilder, we are not processing refresh-on-insert and refresh-on-update attributes correctly. We end up forming an invalid SQL statement and the JDBC driver gives the obscure NullPointerException.
    Thus, until 9.0.3, you should not use refresh-on-insert/update attributes on a non-Oracle SQLBuilder.
    If you need the refresh-on-insert/update attribute, here is a possible workaround:
    1. Whenever you invoke the tester, on the first panel, click on the 'Properities' tab. In the list of properties, you should find one for 'jbo.SQLBuilder'. It will say 'SQL92'. Remove it, so that it is empty. Run test tester. Then, the tester will use Oracle SQLBuilder which will handle refresh-on-insert/update attributes correctly for you.
    2. For switching between Oracle SQLBuilder and SQL92 SQLBuilder, you can try the following:
    2a) Locate bc4j.xcfg and your Project??.jpx under your 'src' directory.
    2b) Make copies of these files.
    2c) Edit them so that you have one set for Oracle SQLBuilder and one set for SQL92 SQLBuilder. For Oracle SQLBuilder, make sure these files do NOT have entries like:
    <jbo.SQLBuilder>..</jbo.SQLBuilder> in bc4j.xcfg and
    <Attr Name="_jbo.SQLBuilder" Value="..." /> in Project??.jpx
    When there is no jbo.SQLBuilder entry, BC4J will default to Oracle.
    For SQL92, make sure you have
    <jbo.SQLBuilder>SQL92</jbo.SQLBuilder> in bc4j.xcfg and
    <Attr Name="_jbo.SQLBuilder" Value="SQL92" /> in Project??.jpx.
    Before you run, decide which SQLBuilder to use (for 9.0.2, with retrieve-on-insert/update attrs, you have no choice but to use Oracle SQLBuilder) and copy these files into your class path, e.g.,
    <jdev-install-dir>\jdev\mywork\Workspace1\Project1\classes
    When you get 9.0.3, then you should be able to switch between Oracle and SQL92 SQLBuilders freely.
    Thanks.
    Sung

  • Regarding "Change Indicator + History Column + Refresh After Update"

    Hi,
    In our app, we are not using any separate column for change indicator and using LastUpdateDate as both Change Indicator and History Column(Modified On) as well.
    The problem is that when 'Refresh After Update' option is not selected for this column, then RowInconsistentException is throw on commit for multi user scenario, and when 'Refresh After Update' option is selected for this column, then exception is not thrown but value is also not updated. Here is the summary of observations:
    Settings for LastUpdateDate Column:
    Only Setting History Column (Modified on)
    Single User - Value Updated , no exception is thrown.
    Multi User - throws (oracle.jbo.RowInconsistentException) JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[3 ]. for second user.
    History Column ( Modified on ) & Change Indicator property checked.
    Single User - Value Updated , no exception
    Multi User - throws (oracle.jbo.RowInconsistentException) JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[3 ]. for second user.
    History Column ( Modified on ) & Change Indicator property checked & Refresh After Update option enabled.
    Single User - Value not updated, no exception thrown
    Multi User - Value not updated, no exception thrown
    What I want is that in multi user scenario, the value of LastUpdateColumn should be updated and no exception should also be thrown.
    Is this a bug in ADF Techstack or am I missing something?
    Thanks,
    Lalit.

    First and Second scenario are as expected.
    1) Only Setting History Column (Modified on)-> Last updated value will be updated when a user changes anything in that entity. But if another user tries to update the entity on top of a stale state then lost update detection is performed by ADF by comparing every attribute of entity against current values in database. So it will give error.
    2) History Column ( Modified on ) & Change Indicator property checked.
    Same thing will happen as in case of first scenario but this time detection of lost update will be more efficient as framework will check only that column for "lost update" detection for which change indicator is selected.
    But for the third one where you have selected the history column LastUpdatedDate as a change indicator with "Refresh On Update" selected, the behaviour is strange. I do not know why the last updated date is not updated after a commit. It does not throw any error also which it actually should. It is not detecting lost updates in this scenario. Probably because the only change indicator LastUpdatedDate is not changed.
    Regards,
    Harmeet

  • How to refresh after delete the records in ALV report ?

    Hi Friends,
    How to refresh after delete the records in ALV report.
    I am deleting records in ALV report .
    After successful delete the screen should refresh.
    u201C Deleted records should not appear in the screen u201C.
    Please guide me.
    Regards,
    Subash

    Hi subhash,
    FORM user_command USING r_ucomm LIKE sy-ucomm      rs_selfield TYPE slis_selfield.
    WHEN 'BACK'.
    Refresh the internal table from the ALV grid
          PERFORM update_alv_tab.
    ENDFORM.                    "user_command
    FORM update_alv_tab .
      DATA :  e_grid TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = e_grid.
      CALL METHOD e_grid->check_changed_data.
      "update_alv_tab
      CALL METHOD e_grid->refresh_table_display.
    ENDFORM.                    " UPDATE_ALV_TAB
    Then see in Debug mode is it updating or not..
    Please confirm .
    And please paste the code if you can.
    Regards.

  • Creating a MV with REFRESH ON COMMIT

    Hi,
    I can't seem to get the following Materialized View to compile:
    REATE MATERIALIZED VIEW MV_MyMatView
    REFRESH ON COMMIT
    AS
    SELECT COL_ValidFrom, COL_AnotherCol
    FROM MyTable
    I get error ORA-12054. Originally I had a MAX()-thing in my select and when I searched the web I found this article ( http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10736/basicmv.htm#i1007028 ) And it looked to be the solution. However I did everything it said and I still could not compile (same error). So I tried to remove the MAX() but i STILL could not compile. Any Ideas on what to do?
    The MV-Log was created like this:
    CREATE MATERIALIZED VIEW LOG ON MYSCHEMA.MyTable
    WITH PRIMARY KEY, ROWID
    INCLUDING NEW VALUES
    Could it be an issue that both my referenced columns are part of the Primary Key? I am the owner of the table. I also tried this: GRANT ON COMMIT REFRESH TO "MYSCHEMA"; but it was not recognized.
    Basically i cant create ANY materialized view with REFRESH ON COMMIT. Why, oh why?
    Thanks!
    Message was edited by:
    DavidNils

    Hello
    Unfortunately I don't have a 9i or 10g database to test on at the mo but I believe the package dbms_mview should help. There is a procedure called explain_mview that allows you to check what an mview can do. It dumps the results into a table so you can see what it can and can't do and why.
    Here's a link to the docs. http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_mview2.htm#95440
    Hopefully that will help you to find out why you can't do a fast refresh on commit.
    HTH
    David

  • After commit current row is no longer highlighted

    JDeveloper 11.1.1.20.
    Scenario: a master detail page where master and detail are both ordinary ADF table ( NOT read-only).
    If I place the cursor on a master row and do a click the row is highlighted.
    If I do a createInsert operation (with a button) a new row is created above the previous mentioned row.
    Problem:
    If I do a commit after the new row is filled with data sometimes the newly made row is now longer highlighted after the commit.
    The newly created row is stil active. This is seen by the fact that if I subsequently creates a new deatil row it is correctly connected to the newly created master row.
    And - after the newly created detail row is created the master row is again highligted.
    Any ideas?
    Best regards
    Erik

    Hi,
    To keep highlight the selected row do some operation in bean ,Get selected row and set that row again after commit
    Check
    http://jobinesh.blogspot.com/2011/01/declaratively-setting-current-row-key.html

Maybe you are looking for

  • Date Picker not allowing to capture time

    Hello Friends, I am trying to create a tabular form on a table[create SQL as below]. CREATE TABLE  "JOB_RUN_DETAILS"    (     "JOB_NAME" VARCHAR2(100),      "SCH_RUN_DATE" DATE,      "START_DATE" DATE,      "END_DATE" DATE,      "STATUS" VARCHAR2(100

  • AdHoc Set Query - set operations - practical use

    Hi I am writing a user manual about AdHoc Query - including Set operations. I am looking for good examples when to use the different operations.  A-B is easy.  Example - 'give me all employees that are not on maternity leave'.  But I am struggling wi

  • How do I fix the orientation of a desktop background photo?

    I have a bunch of photos that I'd like to be able to use as my desktop background - all are saved on my computer with the correct "portrait" orientation, but when I open system preferences they weirdly show up in "landscape" orientation.  I've tried

  • Cannot setup WRE54G ver. 3 expander to network

    I had to reset my network this morning due to some weird glitch that caused my whole network to disappear. My router is a WRT310N. I have an SSID (broadcasting) and a password on my router. The problem is I cannot get my expander to connect to the ne

  • Error while installing Forms Dev. 11gR2(Version 11.1.2.0.0) on Windows8

    Hi all! In configuration stage of installation time it's showing following error. 1. http://img69.imageshack.us/img69/9789/error1ah.png 2. http://img195.imageshack.us/img195/4789/error2kx.png please help someone.