Need to Set Current Row when Using Built-in Data Control Delete Operation?

I have an af:table bound to a ViewObject (VO) collection (no Entity Object) - within each row, I include a column that contains a 'Remove' command button so the user can remove the row. I add the command button by dragging/dropping the built-in delete operation from the VO on the Data Control Palette. When I use this as is (no changes), the Remove button always deletes the first row in the collection, not the selected row. Do I need to add code to set the current row, and if so can someone please provide an example and specify where I need to add? thanks.
------ .jspx af:table with command button to remove each row ------
<af:table value="#{bindings.ListView1.collectionModel}" var="row"
rows="#{bindings.ListView1.rangeSize}"
first="#{bindings.ListView1.rangeStart}"
// note: I don't have any code added for selectedRow or makeCurrent - assuming this is built-in?
selectionState="#{bindings.ListView1.collectionModel.selectedRow}"
selectionListener="#{bindings.ListView1.collectionModel.makeCurrent}">
<af:column>
<af:commandButton actionListener="#{bindings.Delete.execute}"
text="Remove"
disabled="#{!bindings.Delete.enabled}"/>
</af:column>
---------- corresponding pagedef file ------------
<bindings>.....
<action id="Delete" IterBinding="ListView1Iterator"
InstanceName="SrchDataControl.ListView1"
DataControl="SrchDataControl" RequiresUpdateModel="false"
Action="30"/>
</bindings>
Note: I also tried solution posted on following thread, but again, only first row is deleted, not the selected row?: Delete and Commit
Message was edited by:
javaX

I just want to delete (or remove) it from the VO. Data for this VO is not on the database.
The function is doing what I want it to do (delete from the VO), its just always deleting the first row, versus the selected row. I select the command button next on a column next to an item further down in the list and it deletes the first row. The problem is setting the selected row to be removed - I thought setting the current row would be taken care of by the SelectListener?
selectionState="#{bindings.MyIspListView1.collectionModel.selectedRow}"
selectionListener="#{bindings.MyIspListView1.collectionModel.makeCurrent}"

Similar Messages

  • How to Select the Current Row When Using af:iterator?

    Hello all,
    I encounter the following problem when using af:iterator to display data from
    a View Object:
    When trying to display the content of a row via a popup, only the first row is
    returned no matter which row is selected. So a selection of the current row
    should exist or some other method which should allow the access to the
    current row.
    The af:table has a selectionListener attribute which permit to achieve this.
    Does anyone know about some similar attribute or some method for
    selecting the current row when the af:iterator is used?
    Thank you,
    Mirela

    I would be interested in the answer to this basic question as well. I cannot get the selected row value of an attribute in an iterator for a view if I simply set-up a attribute binding to the iterator. It seems that this should be possible. I've had no other option but to obtain the current row and the related attributes programmatically. This works fine, but if there is a more elegant option, then I'd certainly like to use it.
              <af:table value="#{bindings.CompaniesView1.collectionModel}"
                            var="row"
                            rows="#{bindings.CompaniesView1.rangeSize}"
                            emptyText="#{bindings.CompaniesView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                            fetchSize="#{bindings.CompaniesView1.rangeSize}"
                            selectedRowKeys="#{bindings.CompaniesView1.collectionModel.selectedRow}"
                            rowBandingInterval="0" id="tCompanies"
                            summary="Companies"
                            width="100%"
                            rowSelection="single"
                            binding="#{CompanyBackingBean.companiesTable}">Page Def:
        <attributeValues IterBinding="CompaniesView1Iterator" id="Id">
          <AttrNames>
            <Item Value="Id"/>
          </AttrNames>
        </attributeValues>I should be able to get the Id attribute value of the current selected row using "#{bindings.Id}", right? Well, it doesn't work for me. Any ideas?
    Thanks

  • Issue in getting current row value using getCurrent Value

    Issue:When I call ththe method executeSearchVO from controller class
    with Row row = personalActionSearchVO.first();
    I am getting the corresponding value.
    but my requirement is I have multiple record , If i press action on any of the record, I need to read SITName value for the particular record and need to pass it as parameter to other pager(i mean If i select any record, I need to get corresponding value in the attribute for the record.)
    if i comment personalActionSearchVO.first(); i am getting null pointer exception.
    Pl. helpme how to get current row instead of first row always.
    AMIMPL Clause
    public void executeSearchVO(String loginPersonId)
    XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
    personalActionSearchVO.initQuery(loginPersonId);
    // Row row = personalActionSearchVO.first();
    row = personalActionSearchVO.getFirstFilteredRow("action","1");
    Row masterRow = row;
    personalActionSearchVO.setCurrentRow(masterRow);
    OARow Row1 = (OARow)personalActionSearchVO.getCurrentRow();
    System.out.println("Org "+Row1.getAttribute("Organization"));
    calling this method from controller clause
    if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
    System.out.println("Person Id "+ pageContext.getParameter("XXHRPersonId"));
    Serializable methodParams[] = {pageContext.getEmployeeId()+""};
    applicationModule.invokeMethod("executeSearchVO",methodParams);
    need it urgently. pl. help
    thanks
    siva

    Timo,
    I am new to Jdevloper. I will explain the issue in detail.
    Version: Oracle 9i Jdeveloper
    I have a query page with multiple records. when I perform action , I need to pass 2 parameters from query screen to my actual page.
    1 parameter is Login person Id,. Now the issue is with getting current value for 2nd paramenter. 2nd Parameter will be changed depends upon record i am choosing in my query page: column is : Information Name.
    when I use getcurrentrow , I am getting null pointer exception.
    My controller class when I click action button :
    if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
    Serializable methodParams[] = {pageContext.getEmployeeId()+""};
    applicationModule.invokeMethod("executeSearchVO1",methodParams);
    {color:#993300}
    // Here I need to get InformationName value based on the record I am choosing{color}
    HashMap hashMap = new HashMap(2);
    hashMap.put("XXHRPersonId", pageContext.getParameter("XXHRPersonId"));
    // hashMap.put("InformationName", methodParams);
    pageContext.forwardImmediately(
    "OA.jsp?page=/xxhr/oracle/apps/xxhr/selfservice/personalaction/webui/XXHRPersonalActionPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    hashMap,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO
    my AMIMPL Clause :
    I am just pasting whatever I have tried. Pl. suggest me If my code is wrong.
    *{color:#993300}I need to get current row information value from the below method*
    *{color}*
    public void executeSearchVO1(String loginPersonId)
    XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
    personalActionSearchVO.initQuery(loginPersonId);
    System.out.println("Row count "+personalActionSearchVO.getRowCount());
    // Row row = personalActionSearchVO.first();
    Row row = personalActionSearchVO.getCurrentRow();
    System.out.println("Informaton Name "+row.getAttribute("InformationName");
    In this , If i initialzie with Row row = personalActionSearchVO.first();I am able to get value for my column Information Name.
    whereas, if I use directly Row row = personalActionSearchVO.getCurrentRow();, i am getting null pointer exception.
    Pl. let me know how to get current row value for Information Name.
    Looking for the reply at the earliest.
    Thanks
    siva

  • LOV switcher and set current Row

    Hi
    I have a LOV switcher attached to one of the columns in the view object.
    It works fine while switching the LOV's in mostly all conditions.
    But its failing for one case.
    We are using checkboxex to select a row , and do a operation in the row.
    To do this, the button on which the operation is performed ...
    1)we have checked which row has the transient value of check box as checked
    2) Set the current row of the iterator to the row that comes from the selected check box index..
    3) Called the operation.
    But as the code go to step two and the current row is set to the required row, all the LOV 's in all the rows start showing the Default LOV which is selected in the LOV switcher, if i do a f5 fr the page, the original values are restored.
    Also if the VO fecth size is 25 , it gives wrong value for 25 rows, if i scroll through the table again it automatically shows the correct value.
    This has been taking a lot of out time to debug the issue.
    I guess its somethng to do with LOV switcher , set current row and the table getting refreshed incorrectly on set current row

    Hi Timo ,
    Thanks fr the reply..
    Jdev 11.1.1.4
    Code for checkbox selection
    DCBindingContainer dcbindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator =
    dcbindings.findIteratorBinding(iteratorName);
    Row[] rowSet = iterator.getAllRowsInRange();
    Integer selectCount = 0;
    for (Row row : rowSet) {
    Object selAtt = row.getAttribute(selectAttribName);
    if (selAtt != null && (Boolean)selAtt == true) {
    System.out.println("Row selected");
    selectCount++;
    if (selectCount > 1) {
    System.out.println("More than one row selected!");
    throw new ValidationException("More than one row selected");
    else{
    iterator.setCurrentRowWithKey(row.getKey().toStringFormat(true));
    } else {System.out.println("Row not selected");}
    I actually sorted the issue out
    had to write
    iterator.refresh(Row.REFRESH_CONTAINEES); after iterator.setCurrentRowWithKey(row.getKey().toStringFormat(true));
    But not sure if thts correct ...

  • I have a Steinberg MI4 and a Roland Fantom X7, and am trying to use my Fantom in Logic to record audio. Need help setting it all up using MIDI cables. Please help !

    I have a Steinberg MI4 and a Roland Fantom X7, and am trying to use my Fantom in Logic to record audio. Need help setting it all up using MIDI cables. Please help !

    Encryption wouldn't matter except for Wifi.
    While 10.2 might help, there's not much you can do on the Internet these days with less than 10.4.11
    Tiger Requirements...
    To use Mac OS X 10.4 Tiger, your Macintosh needs:
        * A PowerPC G3, G4, or G5 processor
        * Built-in FireWire
        * At least 256 MB of RAM (I recommend 1GB minimum)
        * DVD drive (DVD-ROM), Combo (CD-RW/DVD-ROM) or SuperDrive (DVD-R) for installation
        * At least 3 GB of free disk space; 4 GB if you install the XCode 2 Developer Tools  (I recommend 20GB minimum)
    http://support.apple.com/kb/HT1514
    http://www.ebay.com/sch/i.html?_nkw=mac+os+x+tiger+retail+10.4
    See Tom's, (Texas Mac Man), great info on where/how to find/get Tiger...
    https://discussions.apple.com/message/15305521#15305521
    Or Ali Brown's great info on where/how to find/get Tiger...
    http://discussions.apple.com/thread.jspa?messageID=10381710#10381710
    As far as Memory, that's sort of easy, find your eMac here...
    http://eshop.macsales.com/MyOWC/Models.cfm?Family=emac&sType=Memory
    As far as Hard Drive, it's not easy to replace the Internal drive, I'd maybe suggest an external Firewire drive to boot from...
    http://eshop.macsales.com/item/Other%20World%20Computing/MAU4S7500G16/

  • How can I show additional tab rows when using many open tabs?

    How can I show additional tab rows when using many open tabs?

    What method (code) did you use to get the Tab bar displaying in the space used for the Navigation Toolbar (location bar)?
    The Tab bar should be displayed above the Navigation Toolbar.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do you stop needing to verify email password when using yahoo.att with Mac Mail

    How do you stop needing to verify email password when using yahoo.att with Mac Mail?

    Nevermind, I fixed it (I think).  I went into Settings | Accounts & Sync and found Yahoo at the bottom of the list (alphabetically).  I selected it and it had an optiion to delete the account, which I did.

  • Is there any way to stop the delay between different sets of speakers when using airport express?

    Is there any way to stop the delay between different sets of speakers when using airport express?

    Unfortunately, I don't have either a Slingbox or iHome speakers so I won't be able to reproduce any of the issues you are having. With the fact that you live in large apartment complex would still lead me to believe that Wi-Fi interference may be the reason that you are having streaming issues.
    I suggest you perform a simple site survey, using utilities like iStumbler, or AirRadar to determine potential areas of interference, and then, try to either eliminate or significantly reduce them where possible.

  • Do you need to set your iPod to use it abroad

    You need to set an iPod to use it abroad?

    Chrisob23 wrote:
    You need to set an iPod to use it abroad?
    No.  WiFi is WiFi is WiFi.

  • When using Time Machine, if I delete items from my computer, will they still be backed up to access later on my external hard drive? In other words, when time machine backs up again, will it delete the files from the back up?

    When using Time Machine, if I delete items from my computer, will they still be backed up to access later on my external hard drive? 
    In other words, when time machine backs up again, will it delete the files from the back up that I have deleted from my computer?

    No, I do not believe so. Time Machine would keep all those now-deleted files in previous backups, and as time goes by those backups might be deleted if you needed room, but it would still keep one backup from each day in last month, as well as one from each week forever, as long as you don't start running out of room, then just the oldest would be deleted to make room if needed.
    I use a backup drive about double the size of my drive to be backed up, so I would guess it will never get to the point where deleted files being replaced by new ones being backed fill up that drive to the point where backups actually have to get deleted.

  • I wanted to send some photos out but was told I need to create a new profile, use mail icon in control panel no icon there how do I get it done?

    I want to send some photos from Firefox, when I tried it said I need to create a new profile, use mail icon in control panel. I went to control panel and do not know what to do.'''bold text'''

    As all of the msuic came from your computer in the first place it should still be there.  Is it not?
    EVERYTHING on your ipod should also be on your computer and should be included in your regular backup copy of your computer.
    Make sure that everything is on your computer.  You can transfer itunes purchases from the ipod.  Without syncing:  File>Transfer Purchases.
    When everything is on your computer, then it can be synced back to the ipod after updating.

  • When used as an Activex control in windows How can I prevent the "Q" logo from appearing between streaming videos?

    When used as an Activex control in windows How can I prevent the "Q" logo from appearing between streaming videos?

    Hello Cgifford,
    Welcome to National Instruments Forums.
    To output your signal to the PFI lines,
    you can use external connectios between OUT0 and PFI lines. You can also use
    the backplane to do so by routing into the same RTSI line.
    1)
    On the SCOPE and FGEN, the name of the
    terminals are actually “PXI Trigger Line x/RTSIx” but on the 6602 you might
    need to route the signal using the property:
    You can also use the DAQmx route signal which perform the same opperation.
    2)
    This will depend on the frequency of
    your pulse train. If this is lower than about 10 ms, then you can probably
    place this on a loop and start and stop the acquisition every time. If the
    frequency is higher than this, you will have to use:
    -       Scripting on the FGEN side (read more)
    -       MultiRecord Fetch (more information in the scope help file
    section “Acquisition Functions Reading versus Fetching”).
    3)
    The short answer is yes. The longer one
    might depend on how tight you need the synchronization to be (us, ns, ps). For
    very tight synchronization, you should look into here.
    Message Edited by Yardov on 06-18-2007 03:14 PM
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    property.JPG ‏7 KB

  • OSB & xquery: when use text() or data(...)

    Hi all,
    I'm a beginner on xquery and I'm wondering when use text() or data(...).
    For example I've this simple xml document:
    <book>
    <author>A</author>
    <year>2010</year>
    <price currency="CHF" >100.123</price>
    </book>
    for retrieving attribute value I have to use data(/book/price/@currency)
    but for for retrieving tag value I've two possibilities:/book/price/text() or data(/book/price)
    Are those two expressions the same ? Or ones is evaluated faster than the others ?

    Text() - always returns the String.
    data() - accepts a sequence of items and returns their typed values (return type is xs:anyAtomicType). Calling this function is often unnecessary because the typed value of a node is extracted automatically (in a process known as atomization) for many XQueryXPath 2.0 expressions, including comparisons, arithmetic operations and function calls. The most common use case for the fn:data function is in XQuery element constructors.
    Regards,
    Anuj

  • Problem connecting using VB Oracle Data Control oradc.ocx but otherwise ok.

    I am trying to run one of the sample vb apps DataCtrl that uses the Oracle Data Control (oradc.ocx) to simplify connecting to a database and getting the data into a databound control. I have tried every combination of name/id/pw and get the same error - ORA-12154:TNS:could not resolve service name.
    I have 2 of the sample databases created - "employees" and "demo". Using XE, i can open and view both db's with no problem. Using the ODBC configuration dialog I can configure and test the connection to both and tests ok. I have used programs to convert Oracle to Excel and Excel to Oracle and both find the db with no problem either.
    If I tnsping to XE, employees or demo, the response is negative. The file tnsnames.ora exists in the /admin dir and lists only XE. The file sqlnet.ora has nothing (except comments) in it.
    I have read every bit of documentation on the internet and no help. I just opened "employees" and "demo" again with XE without a problem. However when I try to run the Oracle/Excel conversion programs now, they are now showing the 'name error also. I have tried both the sample VB app and the Oracle/Excel converter programs with XE/employees open and closed and it makes no difference.
    Everything that I have read indicates that you should be able to use the actual db name, ie; "employees". I have run out of combinations of names/ids/pws and hope I can get some help here. Thanks in advance.

    The firewall was blocking TNSLSNR.exe!

  • If I set the new mountian lion will my data be deleted?

    If I set the new mountian lion will my data be deleted or will they still be there?

    Before embarking on this venture, ensure that you have a bootable backup/clone of your current SL installation so you can restore it. Do note that no PPC apps work in Lion/Mtn Lion. See these for details:
    http://www.macmaps.com/upgradefaq.html
    http://www.macmaps.com/backup.html
    http://www.thexlab.com/faqs/installswupdates.html
    http://www.thexlab.com/faqs/backuprecovery.htm

Maybe you are looking for