Stay on previous or next row on rollback.

Hi,
I have an af:table where a new row can be created. On Rollback, current selected row is first. Instead of moving to first row, how I stay on any previous or next row ?
I am programmatically setting current row in bean but since row is lost by rollback, when setting current row NPE is coming.
Jdev 11.1.1.3 , ADF RC, BC.
Thanks.

Hi,
You can achieve your desired functionality very easily by following the following steps:
1. Override the prepareSession method of your Applicaiton Module implementation class and denote to the framework not to clear the cache after a rollback by using getDBTransaction().setClearCacheOnRollback(false)
2. If you are using a read-only view object, you need to enable the findByKey method by overriding the create method of the view object implementation class and adding the following after the call to super: setManageRowsByKey(true);
3. Lastly, you need to override the beforeRollback and afterRollback methods of your view object implementation class to get the current row before rollback and set the current row after rollback.
Give it a try. If you find diffulties overriding these two methods then just reply to my message and i would be glad to provide you with sample code.
Regards
Antonis

Similar Messages

  • Table with column group (one column) - next row is showing on new page instead of below previous row

    I am creating new table. My goal is to display some text in few lines like this:
    "AAAAAAAA"           "BBBBBBBB"           "CCCCCCCCC"     
    "DDDDDDD"           "EEEEEEEE"
    Actually the next row (with "DD" and "EE" values) is not displayed below first row, but on the next page.
    I've tried to put table into rectangle, disabled all page breaks and still the same effect. Any help?

    Hi Heidi,
    Actually, it's not solution, I only gave more details about my problem :)
    Another description:
    In my report I'm creating Tablix with Column grouping. There is only one column with image (every image has same width). If there is only three pictures, then they are displayed next to each other in one row.
    In case, there is more than three pics, another row is showing on next page. I'd like to display all rows one after another on one page.
    I've tried to create three vertical lists, and filter each column group to display only records:
    1) =(RowNumber("Tablix1")) mod 3 = 1
    2) =(RowNumber("Tablix1")) mod 3 = 2
    3) =(RowNumber("Tablix1")) mod 3 = 0
    Unfortunately, I got an error:
    "A FilterExpression for the tablix ‘Tablix1’ uses the function RowNumber.  RowNumber cannot be used in filters."
    Do You have any other propositions?
    --------EDIT--------
    ok, I manged to solve it. As I said, I've created three vertival lists and placed them next to each other.
    Then, instead of using filter, I've used Visibility trigger:
    1)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix1") mod 3 = 1, false, true)
    2)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix2") mod 3 = 2, false, true)
    3)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix3") mod 3 = 0, false, true)
    I had to use function RunningValue to count all occurrences, as my report is quite complex and "RowNumber" [ssrs function] and "ROW_NUMBER() OVER (ORDER BY [rowgroupfield])" [sql query] were not working properly.

  • QUery retrieving based on previous and after rows.. pls help

      CREATE TABLE "POP"."RP06"
       (     "NUM" NUMBER(7,0),
         "SEQ_LINE" NUMBER(7,0),
         "CHMP" VARCHAR2(4000 BYTE)
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,1,'( ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,2,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,3,'AND ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,4,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,5,'OR ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,6,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,7,'AND /*4*/ ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,8,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,9,'OR ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,10,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,11,'AND ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,12,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,13,'OR ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,14,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,15,'OR ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,16,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,17,'AND ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,18,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,19,') ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,20,'AND /*10*/ ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,21,'ORACLE  IS  GREAT');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,22,'AND /*11*/ ');
    Insert into RP06 (NUM,SEQ_LINE,CHMP) values (100,23,'ORACLE  IS  GREAT');after inserting the rows i want to retrieve the rows as follows
    1 select the chmp which satisfied the condition if the chmp has previous row is  'AND'* and next row 'OR'* example: chmp with seq_line 4 which has previous 'AND' in seq_line 3 and 'OR' in seq_line 5. so retrieve the 4th seq_line chmp.
    ( CHMP WITH SEQ_LINE 8,12 ARE other EXAMPLES)
    2) select the chmp which satisfied the condition if the chmp has previous row is *'OR' and next row 'AND'*
    example: chmp with seq_line 10 which has previous 'OR' in seq_line 9 and 'AND' in seq_line 11. so retrieve the 10th seq_line chmp.
    ( CHMP WITH SEQ_LINE 6,16 ARE other EXAMPLES)
    Kindly help
    S

    Hi,
    You can use the analytic LAG function to get the value from the last row before a given row, and
    you can use the analytic LEAD function to get the value from the next row after a given row.
    For example:
    WITH     got_neighbors     AS
         SELECT  num, seq_line, chmp
         ,     LAG  (chmp) OVER ( PARTITION BY  num
                           ORDER BY      seq_line
                         )     AS prev_chmp
         ,     LEAD (chmp) OVER ( PARTITION BY  num
                           ORDER BY      seq_line
                         )     AS next_chmp
         FROM     rp06
    --     WHERE     ...     -- Any filtering goes here
    SELECT  num, seq_line, chmp
    FROM     got_neighbors
    WHERE     prev_chmp     LIKE 'AND %'
    AND     next_chmp     LIKE 'OR %'
    ;I assume that your real table can have many values for num, and that when you talk about the "earlier" or "next" row, you mean a row with the same num. If that's not the case, then remove "PARTITION BY num".
    Analytic functions are computed after the WHERE clause is applied, so to use the results of analytic functions in a WHERE clause, compute them first in a sub-query (such as got_neighbors), and then use them in the WHERE clause of a super-query.

  • Navigate previous record,next record by entering key-up and key-down

    Hi ,
    JDeveloper11g_
    I am trying to solve of how to navigate previous record,next record by entering key-up and key-down in ADF Table.
    If any of you have this solution by JScript of Backing Bean please help me.
    Thanks
    zakir
    ===

    Hi zakir,
    I hope I understood your requirements correctly. You have an editable ADF table. You would like to use the up/down arrow keys to move from one row to the next/prev row of the same column. Since the Tab key moves the cursor to the right and Shift+Tab moves it to the left, now you want to implement the same thing but just up and down, correct? If so, try this.
    /** Javascript **/
    function detectKey(evt) {
        var inputText = evt.getSource();
        var id = inputText.getClientId();
        var start2 = id.indexOf(":") + 1;
        var end2 = id.lastIndexOf(":");
        var numValue = parseInt(id.substring(start2, end2));
        var evt2 = evt.getNativeEvent();
        arrows=((evt2.which)||(evt2.keyCode));
        switch(arrows) {
            // Up arrow
            case 38:
            numValue = numValue - 1;
            break;
            // Down arrow
            case 40:
            numValue = numValue + 1;
            break;
        var newStr = id.replace(/:\d:/, ':' + numValue + ':');
        var comp = AdfPage.PAGE.findComponent(newStr);
        if (comp != undefined) {
            comp.focus();
    /** Jspx. (Place a client listener on each inputText in the ADF table) **/
    <af:column .....>
      <af:inputText value="#{row.bindings.price.inputValue}" .....>
        <af:clientListener type="keyDown" method="detectKey"/>
      </af:inputText>
    </af:column>With this, you get to move Up/Right/Down/Left in the editable ADF table without using the mouse.
    References:
    http://thepeninsulasedge.com/blog/?cat=29
    af:clientListener attributes and methodes of event object in java script
    Regards,
    Chan Kelwin

  • How to find previous and next value of a cursor?

    Im trying to do an update to a table.
    I have a set of rows fetched in a cursor. Now i loop through the cursor and update a field in the table.
    for certain condition alone i need to fetch the previous value in the cursor and update the table with that.
    can anyone let me know if i can fetch the previous and next value of a cursor for this DML operation?
    Thanks in advance.

    You can do it via PL/SQL routine.

  • Copy a certain row of data into the next row in a same internal table ??

    HI, guys.
    May i know how to copy a certain row of data into the next row in a same internal table ?? Bcz I plan to update a certain colum of data in the row just now into another value..
    For example:-
    *at first...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln3   ebelp3   xblnr3
    *after that, become...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln2   ebelp2   xblnr4
    ebeln2   ebelp2   xblnr5
    ebeln3   ebelp3   xblnr3
    Thanks in advance.

    hi,
    If you have this kind of requirement then you must be having 2 internal tables ,one existing data and 2nd from which you have to insert the records into 1st table.
    so in this case,
    loop at itab1.
      v_index = sy-tabix.
      loop at itab2 into wa where pri_key = itab1-pri_key.
      v_index = v_index + 1.
      insert  wa into itab index v_index.
      endloop.
    endloop.
    Using this code ,your data records similar to your 1st tables primary key records will get inserted into table.

  • Firefox can't find the file at (a location is specified) when either "Navigate previous" (and next) buttons are pressed in an HTML5 skin (but OK in IE/Chrome).

    I create HTML5 help projects from a package called MadCap Flare. It uses what they call an HTML5 'skin' that sets the style/layout of the page and also includes 'Navigate previous' and 'Navigate next' buttons. When viewing the help and pressing these navigate buttons in IE8 or Chrome 32 there is no problem, but in Firefox 27 I get the following: (typical error for pressing a button on any page)
    "File not found"
    "Firefox can't find the file at /C:/SVN/FlareEnglishOnLineHelp/Output/HTML5_Help_Modeller_Reference/4attrib/idh_jointinterface_element_meshes.htm?TocPath=Modeller Reference Manual|Chapter 5 : Model Attributes|Meshing|_____2."
    " Check the file name for capitalisation or other typing errors."
    " Check to see if the file was moved, renamed or deleted."
    - Because the files and buttons work in other browsers I'm wondering just what is going on here with Firefox>>>>

    I should correct that last entry and state that the | charactacters are generated automatically in the Toc-Path for each 'book' name in the online help, and are not something manually created, whereas the : characters have come from the TOC book topic names (which were manually entered names and are what we would ideally require). But, because 'previous' and 'next' topics within nested TOC books without colon (:) characters CAN be browsed successfully when just | characters are present in the Toc-Path, the limitation would appear to be solely due to the : characters.

  • How to set the current row in table automatically when tabout from one row to next row

    Hi
    I'm using jdev 11.1.2.0.0
    How can we set the  row(in which row focus is)  as current row in the table?
    If we create a table with single row selection, then whichever row we select, that row becomes current row because of the selection listener(#{bindings.xxvo.collectionModel.makeCurrent}).
    Then if we do tabout from one component to another component in table and moved to next row, then the focus would be on another row .
    when focus is shifted from one row to another row, then how can we make the focused row as current row or selected row.
    Any suggestion would we appreciated
    Thanks.

    Add clientListener inside table component and set client listener type to dblClick with method as a JavaScript method name.
    <af:clientListener method="dblclk" type="dblClick"/>

  • Create row as next row on click of add another row button not on top of it

    My af:table is based on a transientVO (all the attributes are transient)
    This is just for data entry and not for data retrieval
    So i have placed add another row button on my af:table
    After i enter data in the first row and click add another row button the data is being moved to second row and the new row is created on top of that
    I want the row to be created as next row . not on top of my existing row
    How can we do this

    would this help you:
    http://lucbors.blogspot.com/2010/12/adf-11g-how-to-control-where-new-row-is.html

  • CS5.5 - Go to previous or next visible item in time ruler (keyframe, marker, work area beginning or

    The
    Go to previous or next visible item in time ruler (keyframe, marker, work area beginning or end)
    J & K
    Does not work at all here.
    Perhaps I am misunderstanding the nature of this feature but from reading the text in the manual I would come to expect
    that hitting i.e. J&K - would go the next visible item in the ruler be that a Keyframe or Marker etc... However, when I hit K timeline takes me to the end of the composition and J to the beginning. And I have a lot of markers set.
    Any Ideas
    Thanks

    It works on layer markers and keyframes, but not comp markers. Furthermore, it will also not work, if index items have been scrolled out of view or are shy even if the property streams and their keyframes are otherwise visible. This has never been any different, but it's quite annoying.
    Mylenium

  • Can I use action build to fade one table row as I move to the next row in the table?

    I have built a table with 6 rows.  Right now,I am building the table row by row when I play the slide. Is there a way to fade or dissolve one row when I move to the next row in the table? I want to be able to de-emphasize the row I just discussed when I move to the next row in the table. I can fade the entire table by invoking that action but I do not seem to be able to use this action one row at a time. Thanks for your comments and assistance.

    you will have to use a workaround to get the exact effect you described
    create a table with out any text
    use text tool to add text and position in each table cell
    select the text boxes( command click) in the first row and group them (arrange > group)
    use a, build in, to display text and then a, build out, to remove it
    repeat the above for the other rows

  • Previous and Next Record

    Is there any additional code needed to replicate the functionality of the previous and next record buttons in the standard toolbar other than the built-ins that are provided? I'm getting some weird results by just using the built-ins. Thanks!

    Well, to give you and example, when I query the first record and then press the button that uses the previous_record built-in I get the message: at first record (same as the toolbar button). However, when I press the next record button, I'll eventually get the message: field must be entered (whereas, the toolbar button will bring up the message: record must be entered or deleted first). I was wondering why the next_record built-in would bring up a different message, and how to get my button to function the same way as the one in the toolbar.

  • Date Picker with Previous and Next Year Options

    Hi All,
    I am implementing a date picker in my application which is tied to an attribute of type PA0001-BEGDA. Date Picker as such works fine but navigating to previous year and Next year options are not available. User has to go month by month to different years if they have to navigate.
    Is this the normal behavior of the Date Picker or am I missing something else to get the previous and Next year icons in the Date Picker.
    Thanks,
    Nagarajan.

    hmm..I tried using the select options and it did give the same date picker with the previous and Next navigation icons...The only problem with the select options is that its a single field which has the range and can accept multiple values too...
    I tried to figure out how the date picker that we use in the custom application and the one in Select Options differ but no luck...Does this ring any bell?
    Thanks,
    Nagarajan.

  • How can i select the next column instead of next row when press enter key

    I need to know how can i select the next column instead of next row when i press the enter key.By default ,when i press enter key the next row is selected and the column remain unchanged but I wants opposite that is the row should remain unchanged but column index will changed.
    Thanks to all.

    Well, the right arrow key will already move you to the next column, so the easiest way to do this is to modify the InputMap to have the Enter key invoke the same Action as the right arrow key.
    You can search the forum for my "Table Actions" (without the space) example that will show you how to do this.

  • Can't figure out the AC to use for my "Previous" and "Next" buttons

    Hi guys,
    I have a slidshow that stretches over 280 frames which can be
    seen here:
    http://www.paragon-nj.com/newslideshow.html
    or the fla:
    http://www.paragon-nj.com/newslideshow.fla
    There are fade ins and outs and I made buttons numbered 1-5
    where you can skip to each new slide. At present I am trying to
    create the "previous" and "next" buttons but I'm hitting a snag of
    how you make something like this work. The entire AC I have is
    this:
    a.onRelease=function(){
    gotoAndPlay(1);
    b.onRelease=function(){
    gotoAndPlay(55);
    c.onRelease=function(){
    gotoAndPlay(110);
    d.onRelease=function(){
    gotoAndPlay(165);
    e.onRelease=function(){
    gotoAndPlay(220);
    next_btn.onRelease = function () {
    (not sure what to put here) ;
    previous_btn.onRelease = function () {
    (not sure what to put here) ;
    Thanks in advance for all the input
    Wil

    use the _currentframe+55 for your next button and
    _currentframe-55 for your previous button unless the current frame
    is 1 or 55 when you were inconsistant used 54 frames between slide
    transitions.

Maybe you are looking for