CreateInsert puts the new row at the top or second to the last

Dear All,
Just one question, is it possible to configure that when you create a new row in an
editable table, it will be place at the end of the rows of the table?
Use Case:
I have a view object coming from the HR schema's Departments table.
I then dropped this page as an editable table and enabled row selection.
To add new row, I drag the create insert option as a button.
<af:form id="f1">
<af:panelStretchLayout id="psl1">
  <f:facet name="bottom">
     <af:panelGroupLayout id="pgl1">
       <af:commandButton text="Add Row" id="cb1"
                              actionListener="#{bindings.CreateInsert.execute}"/>
       <af:commandButton actionListener="#{bindings.Commit.execute}"
                              text="Commit" id="cb2"/>
       <af:commandButton actionListener="#{bindings.Rollback.execute}"
                              text="Undo" immediate="true" id="cb3">
          <af:resetActionListener/>
       </af:commandButton>
     </af:panelGroupLayout>
  </f:facet>
  <f:facet name="center">
     <af:table value="#{bindings.DepartmentsView1.collectionModel}"
                 var="row" rows="#{bindings.DepartmentsView1.rangeSize}"
                 emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                 fetchSize="#{bindings.DepartmentsView1.rangeSize}"
                 rowBandingInterval="0"
                 selectedRowKeys="#{bindings.DepartmentsView1.collectionModel.selectedRow}"
                 selectionListener="#{bindings.DepartmentsView1.collectionModel.makeCurrent}"
                 rowSelection="single" id="t1" partialTriggers="::cb1">
       <af:column sortProperty="DepartmentId" sortable="false"
                     headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
                     id="c4">
          <af:inputText value="#{row.bindings.DepartmentId.inputValue}"
                           label="#{bindings.DepartmentsView1.hints.DepartmentId.label}"
                           required="#{bindings.DepartmentsView1.hints.DepartmentId.mandatory}"
                           columns="#{bindings.DepartmentsView1.hints.DepartmentId.displayWidth}"
                           maximumLength="#{bindings.DepartmentsView1.hints.DepartmentId.precision}"
                           shortDesc="#{bindings.DepartmentsView1.hints.DepartmentId.tooltip}"
                           id="it4">
          </af:inputText>
       </af:column>
       <af:column sortProperty="LocationId" sortable="false"
                     headerText="#{bindings.DepartmentsView1.hints.LocationId.label}"
                     id="c1">
          <af:inputText value="#{row.bindings.LocationId.inputValue}"
                           label="#{bindings.DepartmentsView1.hints.LocationId.label}"
                           required="#{bindings.DepartmentsView1.hints.LocationId.mandatory}"
                           columns="#{bindings.DepartmentsView1.hints.LocationId.displayWidth}"
                           maximumLength="#{bindings.DepartmentsView1.hints.LocationId.precision}"
                           shortDesc="#{bindings.DepartmentsView1.hints.LocationId.tooltip}"
                           id="it2">
          </af:inputText>
       </af:column>
     </af:table>
  </f:facet>
  <f:facet name="start"/>
  <f:facet name="end"/>
  <f:facet name="top"/>
</af:panelStretchLayout>But I notice that when I clicked the createinsert button, the new row is appended at the top of the table.
I then tried to click the last row, but when I click the CreateInsert, it is appended before the last row.
How can I configure this so that it will show at the last row?
Thanks.
JDEV 11G PS 3

Ramandeep Nanda wrote:
* Insert new Rows at the end of RowSet.
* @param row
@Override
public void insertRow(Row row) {
//go to the end of Rowset if it has rows
Row lastRow = this.last();
if (lastRow != null) {
//insert new row at the end and make it current
int indx = this.getRangeIndexOf(lastRow) + 1;
this.insertRowAtRangeIndex(indx, row);
this.setCurrentRow(row);
} else { // empty Rowset
super.insertRow(row);
}     The row will be added at the end. You actually override this method in your voImpl.Works like a charm..
Thanks Ramandeep..learned something new today...

Similar Messages

  • How to use CreateInsert in inseting new row at the beginning of each page

    I would like to insert new row in an editable table bu using CreateInsert. How to insert that at the beginning of every pagination. Let us say, if my pagination is 10, when I insert the record in pagination 21-30, the new record will be inserted and will be the new 21st record. In pagination 1-10, the new inserted row will be the 1st record, and so on.
    The default behavior is the newly inserted record will be at the top of the record where the focus is located. I want the behavior to be always at the top of every pagination. Pls help

    Probably you have to create your own createAndInsert method in view object implementation class and expose it to the client. Then use this method instead of default create and insert action.
    In your new method use createRow() and insertRowAtRangeIndex() methods to insert record exactly where you want.
    Rado

  • I just downloaded the new iOS 5.0 and did all of the backup prompted steps beforehand, but I can't figure out how to get all of my apps and music back on my iPhone. Where did they go and how can I put them back on my iPhone?

    I just downloaded the new iOS 5.0 and did all of the backup prompted steps beforehand, but I can't figure out how to get all of my apps and music back on my iPhone. Where did they go and how can I put them back on my iPhone?

    Hi, Abril_Perez17.
    This may be related to a new feature embedded in iOS7 that shows all purchased music by default.  Go to Settings > Music, then turn off Show All Music.  See if the issue ceases once the feature has been disabled.  This information is located on page 63 of the user guide below. 
    iPhone User Guide
    Regards,
    Jason H. 

  • [SOLVED] ok, so ever since I downloaded the newer version of Firefox my tabs icon (+) on the top is gone. I know I can hit cntrl T, but I really like just clicking the + which opens a new tab. How do I get that back??

    ok, so ever since I downloaded the newer version of Firefox my tabs icon (+) on the top is gone. I know I can hit cntrl T, but I really like just clicking the + which opens a new tab. How do I get that back?? I've looked around the HELP section and can only find info about what tabs are etc... Even in all the picutres about the feature it shows the + icon at the top of the page to open a new one. What do I do??

    NM, got it fixed. Thanks!!!

  • Focusing a field/column in the new row of adf table

    Hi all,
         I am using JDeveloper 11.1.2.4.0. and UI-Shell Template in Main application and sub applications are added to this master application as ADF library jar files. Application is working fine.
    I am trying to focus to make focus on a column in the newly created row in one of the sub application by referring the below link
    http://adfnbpel.wordpress.com/2013/08/14/focusing-a-fieldcolumn-in-the-new-row-of-adf-table/
    I created a single application and found that its working
    But in my application focus is not working.
    When i checked the java script by using FireBug console it is found that comp = AdfPage.PAGE.findComponent(‘”+inputId+”‘); is getting as "undefined" , where inputId = table.getClientId(facesCtx) + “:” + rowId + “:” + “it3″; I am getting the exact row id also. When i tried with by passing the table id as input id like inputId = table.getClientId(facesCtx) ; the fire bug console then showing the table id. So its sound strange.
    What may be the cause of not able to find the input text it3 by using findComponent ?
    Is any body can suggest a solution for this.
    Thanks in advance,
    Gijith

    Hi,
    read up about "findComponentByAbsoluteLocator" in http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
    or check ...
    AdfPage JS doc
    Frank

  • How to insert the new row after current row in RowIterator - Steve Muench

    Hi,
    Our client wants the new row to be added after current row on the front end instead of before current row.
    we were using "new JUActionBinding(this,iterBinding,JUActionBinding.ACTION_CREATE_INSERT_ROW);" this code inserts the new row after current row.
    I tried a lot to insert the new row after current row. Used new JUActionBinding(this,iterBinding,JUActionBinding.ACTION_LAST to move the cursor to last row in rowiterator and the used .ACTION_CREATE_INSERT_ROW but this thing inserts the new row as the second last row.
    Could somebody plesae help ?
    Message was edited by:
    user556161

    I am using JDeveloper 9.0.4.2.0 (Build 1459)

  • When Firefox desktop icon click'd for a new window, all existing windows first refresh with the new FF window on top; how to keep other windows minimized?

    Oldest FF windows are overlaid by newer FF with the new FF window on top.
    This wastes time & monitor-space.
    It is likely just a simple setting somewhere ...
    == This happened ==
    Every time Firefox opened
    == With version 3.6.6.

    This can be caused by a problem with an extension (Tools > Add-ons > Extensions)
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • AddAnotherRow of Advanced Table, does not make the new row as current row

    Hi OAF Gurus,
    Requirement:
    When user presses 'AddAnotherRow' button on OAAvancedTable, the new row that gets added should become the current row of the underlying VO of the table.
    What’s happening:
    When user presses 'AddAnotherRow' button on OAAvancedTable, the new row is not the current Row(VO’s previous current row retains its current status)
    What I tried by far
    APPROACH #1 - when create row
    In VORowImpl - override create and set this new row as current
    public void create(AttributeList attributeList)
    try
    super.create(attributeList);
    // PSUDO CODE
    am = this.getApplicationModule
    vo = am.findViewObject("OAAdvancedTableVO1");
    vo.setCurrentRow(this) // this should set the new row to current.
    But VO's current row is still the old current row and not this new row.
    APPROACH #2 - when insert Row
    I thought that AddAnotherRow , internally must be doing a create() then an insert() row on the VO, so i overridden the insertRow(row) of the VO
    public void insertRow(Row row)
    super.insertRow(row);
    this.setCurrentRow(row)
    System.out.println("COMMENT insert called .............................................");
    But this method is never called by the framework.
    ***Please help me make the newly created row on the OAAdvancedTable using 'AddAnotherRow' (out of the Box) , as the currentRow of the underlying VO***
    Thanks
    Chaitanya

    Thanks a lot Chris.
    I have used your code and it works perfect.
    Now I am not using the out-of-the-box AddAnotherRow, as it does not make the newly added Row as 'currentRow' of the VO
    I have used the following code by Chris and it solves the issue.
    1. Determine the number of already displayed rows on the table
    OAAdvancedTableBean tableBean = (OAAdvancedTableBean) webBean.findChildRecursive(tableID);
    int rowsDisplayed = tableBean.getNumberOfRowsDisplayed();
    replace tableID with the actual value.
    2. I have the following routine to create the row and set it as the current row.
    OAViewObject viewObject = (OAViewObject) findViewObject(viewObjectName);
    int rowCountInRange = viewObject.getRowCountInRange();
    Row row = viewObject.createRow();
    int insertIndex = rowCountInRange;
    if (rowCountInRange == rowsDisplayed) {
    insertIndex = rowCountInRange - 1;
    viewObject.insertRowAtRangeIndex(insertIndex, row);
    viewObject.setCurrentRow(row);
    Thanks again all of you for help
    Regards
    Chaitanya

  • Importing only the new rows in atable

    Hi,
    in 8.1.7 version is there any option for imp that let only import the new lines in a table and keep the ancient rows ?
    Many thanks.

    Hi,
    Just use the ignore=y clause when importing ...
    USER1@ORACLE10> create table a (id number primary key);
    Table created.
    USER1@ORACLE10> insert into a values (1);
    1 row created.
    USER1@ORACLE10> insert into a values (2);
    1 row created.
    USER1@ORACLE10> insert into a values (3);
    1 row created.
    USER1@ORACLE10> commit;
    Commit complete.
    USER1@ORACLE10> select * from a;
            ID
             1
             2
             3
    USER1@ORACLE10> connect user2/pass
    Connected.
    USER2@ORACLE10> create table a (id number primary key);
    Table created.
    USER2@ORACLE10> insert into a values (1);
    1 row created.
    USER2@ORACLE10> commit;
    Commit complete.
    USER2@ORACLE10> select * from a;
            ID
             1
    USER2@ORACLE10> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    C:\>exp user1/pass file=test tables=a
    Export: Release 10.1.0.2.0 - Production on Wed Jan 16 12:59:40 2008
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    server uses WE8ISO8859P1 character set (possible charset conversion)
    About to export specified tables via Conventional Path ...
    . . exporting table A 3 rows exported
    Export terminated successfully without warnings.
    C:\>imp user2/pass file=test tables=a ignore=y
    Import: Release 10.1.0.2.0 - Production on Wed Jan 16 13:00:55 2008
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.01.00 via conventional path
    Warning: the objects were exported by USER1, not by you
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    import server uses WE8ISO8859P1 character set (possible charset conversion)
    . importing USER1's objects into USER2
    . . importing table                            "A"
    IMP-00019: row rejected due to ORACLE error 1
    IMP-00003: ORACLE error 1 encountered
    ORA-00001: unique constraint (USER2.SYS_C006313672) violated
    Column 1 1 2 rows imported
    Import terminated successfully with warnings.
    C:\>sqlplus user2/pass
    SQL*Plus: Release 10.1.0.2.0 - Production on Wed Jan 16 13:01:34 2008
    Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    USER2@ORACLE10> select * from a;
            ID
             1
    2
    3Cheers
    Legatti

  • Make only the new row in a table editable and other rows display mode.

    Hiii all,
    I am working on the component GSWISET, there is a table view for substitutes, the requirement is to show all the rows in the table view in display mode. Whenever the user clicks the button (Add employee), a search popup triggers and the user selects an employee from that and it will come as a new row in the table view. Here I need to be able to make only the new row editable and all the other rows in display mode.
    Could you please suggest a way to achieve this. Thanks for your time..

    Hi,
    Try with  the code below in.htm page
    data: lv_displaymode  TYPE string.
      IF controller->view_group_context->is_view_in_display_mode( controller ) = abap_true.
        lv_displaymode = 'X'.
      ELSE.
        lv_displaymode = ' '.
      ENDIF.
    if lv_displaymode = 'X'.
    <chtmlb:tableExtension tableId = "Substitutes"
                           layout  = "FIXED" >
      <chtmlb:configTable actions               = "<%= controller->gt_button %>"
                          id                    = "Substitutes"
                          onRowSelection        = "select"
                          selectedRowIndex      = "<%= substitutes->SELECTED_INDEX %>"
                          selectedRowIndexTable = "<%= substitutes->SELECTION_TAB %>"
                          table                 = "//Substitutes/Table"
                          width                 = "100%"
                          selectionMode         = "<%= substitutes->selection_mode %>"                    
                          visibleFirstRow       = "<%= substitutes->VISIBLE_FIRST_ROW_INDEX %>"
                          usage                 = "ASSIGNMENTBLOCK"
                          headerText            = "<%= controller->gv_header_text %>" />
    </chtmlb:tableExtension>
    else.
    <chtmlb:tableExtension tableId = "Substitutes"
                           layout  = "FIXED" >
      <chtmlb:configTable actions               = "<%= controller->gt_button %>"
                          id                    = "Substitutes"
                          onRowSelection        = "select"
                          selectedRowIndex      = "<%= substitutes->SELECTED_INDEX %>"
                          selectedRowIndexTable = "<%= substitutes->SELECTION_TAB %>"
                          table                 = "//Substitutes/Table"
                          width                 = "100%"
                          selectionMode         = "<%= substitutes->selection_mode %>"
                          allRowsEditable       = "TRUE"
                          visibleFirstRow       = "<%= substitutes->VISIBLE_FIRST_ROW_INDEX %>"
                          usage                 = "EDITLIST"
                          headerText            = "<%= controller->gv_header_text %>" />
    </chtmlb:tableExtension>
    endif.
    Regards,
    Gangadhar.S
    Edited by: gangadhar rao on Dec 24, 2010 12:49 PM

  • When I click on my finder to put a new folder on my desktop, it apears  on the desktop nut it conatins all the files on my desktop. What I want is a new untitled folder. By the way, this has never happened before, in my many years of using imacs

    When I click on my finder to put a new folder on my desktop, it apears  on the desktop nut it conatins all the files on my desktop. What I want is a new untitled folder. By the way, this has never happened before, in my many years of using imacs

    Are you sure you are choosing "new folder" rather than "new folder window" - new folder results in an empty "untitled" folder on my desktop whereas new folder window shows all my files.

  • I used the migration assistant to transfer files from my PC to my Mac but it recreated my user profile from the PC and I wanted to transfer the files to the new different user profile I've setup on the Mac. How can I transfer everything now?

    I have an older Windows laptop and I am switching to a new MacBook Air. The main user on the Windows laptop is going to be different than the main user on the MacBook. I used the migration assistant to transfer data to the MacBook but it recreated the whole older profile on the new Mac when I just wanted to pull everything over into the new user profile I had already created on the new MacBook. How can I go about putting the data over into the new user profile and erasing the older other user profile it recreated? Would I erase the old user profile on the new Mac and start over with the migration assistant using some setting I missed that lets me pull the data over to the new main user on the MacBook? Or is there a way to rename the old user profile on the Mac to match what I want the new username/password to be somehow?
    Or would it be best to back the data I really need from the old PC onto an external HD and then copy it over to the new Mac from the external HD?
    Looking for advice on how to best go about this. On the old PC I had multiple profiles and it was awkward. On the new Mac I just want a single profile for the primary user and both users will just share the same user profile. I wasn't sure if the Migration Assistant only let you recreate entire profiles or if there was a way to just import data from the old PC's primary profile into the new Mac's new primary profile with some setting adjustment.
    Data would be docs, pics, bookmarks, music. Fairly basic.
    Thanks for any and all advice,
    -Crosscourier.

    Look in the /Users/ folder.

  • I have a MacBook Pro and it is Software is Mac OS X Lion 10.7.4 (11E53). Is this the new operating system or I have to buy the new one? The only thing missing is the Messages.

    I have a MacBook Pro and it is Software is Mac OS X Lion 10.7.4 (11E53). Is this the new operating system or I have to buy the new one? The only thing missing is the Messages.

    And yes, you need LOTS of Internet to get the latest cat. The installer file is just 4.5GB in size, so on most internet connections it will take awhile to download. Once that happens, you will have a choice to install it on top of your existing Lion partition, or onto a different one, that can even be a totally blank one.
    Since you probably don't want to redo the wait, be sure to quit the installer as soon as it finishes downloading and starts up automatically. Then save the installer (called "Install OS X Mountain Lion", and found in your Applications folder) onto another disk before going thru with the installation. When it concludes, it will erase itself.

  • HT1277 I cannot open the new email icon for 10.6.8 and the latest secrtoy update. My old "Stamp" icon email won't let me in either indicating that the new OS version doesn't work. Please help

    I cannot open the new email icon for 10.6.8 including the latest security update. My old "Stamp" icon email won't let me in either indicating that the new OS version doesn't work. Please help. I have spend over 4 hours installing and reinstalling updates, etc. and I don't know where to go from here.....

    Mac OS X v10.6: Mail.app won’t open, or "You can't use this version of Mail…" alert after installing Security Update 2012-004:
    http://support.apple.com/kb/TS4424?viewlocale=en_US&locale=en_US
    Fellow user Grant Bennet-Alder offers this solution:
    Some users have reported this problem if the Mail Application has been moved out of the top-level /Applications folder, or duplicated in another location.
    When the Security Update is done, the old version of Mail is disabled.
    The solution has been to:
    1) make certain Mail is in the /Applications folder
    2) There is no other copy anywhere else.
    3) Once steps 1 and 2 have been done, Manually download and re-apply the Security Update (2012-004) by hand.
    Security Update 2012-004 (Snow Leopard)
    If the Mail.app has been LOST, it can be re-installed by applying the 10.6.8 version 1.1 combo update. But this update is quite large and it is usually not necessary:
    Mac OS X 10.6.8 Update Combo v1.1

  • My Mozzilla crashed: "We're Sorry....Firefox had a problem..." I download the new version and it is still giving me the crash report.

    My Mozzilla crashed: "We're Sorry....Firefox had a problem..." I download the new version and it is still giving me the crash report.
    I tried to loading in "safe mode" but I still could not open Firefox.
    I never received a crash i.d.

    It is possible that there is a problem with the files [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    Delete [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.
    Deleting sessionstore.js will cause App Tabs and Tab Groups to get lost, so you will have to create them again (make a note).
    See:
    * http://kb.mozillazine.org/Session_Restore

Maybe you are looking for

  • Display Purchase requisitions that is not approved.

    Hai all!   i want to display all Purchase requisitions that is not approved, ie. status IN RELEASE should be get display.. so plz give me some sample code 4 achieving this.. the final report should contain PR number, item of requisition, material, an

  • Mail won't send after lion upgrade

    I've an account on me.com and after upgrading to lion mail app doesnt not send mails. All account settings are correct. Any solutions? Or i should to wait until the next update?

  • Oracle Application Server 9i

    Is there an XP version, I can download?

  • SAP Demo Laptop for BP

    Dear all, SAP is providing a Demo laptop for its Partners ( SAP Note : 885697 ) to practice or Demo the Best Practices. Do you know , is this demo laptop software is also available for the Customers too?. Thanks and Regards Vagesan

  • Appraoch for archiving table data from a oracledb and load in archiv server

    Hi, I've a requirement where I need to archive and purge old data in datawarehouse. The archival strategy will select data from a list of tables and load into files. I also need to use sql loader control files to load data from the above files into a