Af:inputListOfValues sets value of first item in result set when using enter key or tab and component set to autosubmit=true

I'm using JDev 11.1.1.6 and when I type a value into an af:inputListOfValues component and hit either the enter key or the tab key it will replace the value I entered with the first item in the LOV result set. If enter a value and just click out of the af:inputListOfValues component it works correctly. If I use the popup and search for a value it works correctly as well. I have a programmatic view object which contains a single transient attribute (this is the view object which is used to create the list of value component from) and then I have another entity based view object which defines one of its attributes as a list of value attribute. I tried using an entity based view object to create the LOV from and everything works as expected so I'm not sure if this is a bug when using programmatic view objects or if I need more code in the VOImpl. Also, it seems that after the first time of the value being replaced by the first value in the result set that it will work correctly as well. Below are some of the important code snippets.
Also, it looks like it only doesn't work if the text entered in the af:inputListOfValues component would only have a single match returned in the result set. For instance given the result set in the code: Brad, Adam, Aaron, Fred, Charles, Charlie, Jimmy
If we enter Cha, the component works as expected
If we enter A, the component works as expected
If we enter Jimmy, the component does not work as expected and returns the first value of the result set ie. Brad
If we enter Fred, the component does not work as expected and returns the first value of the result set ie. Brad
I also verified that I get the same behavior in JDev 11.1.1.7
UsersVOImpl (Programmatic View Object with 1 transient attribute)
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import oracle.adf.share.logging.ADFLogger;
import oracle.jbo.JboException;
import oracle.jbo.server.ViewObjectImpl;
import oracle.jbo.server.ViewRowImpl;
import oracle.jbo.server.ViewRowSetImpl;
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Wed Sep 18 15:59:44 CDT 2013
// ---    Custom code may be added to this class.
// ---    Warning: Do not modify method signatures of generated methods.
public class UsersVOImpl extends ViewObjectImpl {
    private static ADFLogger LOGGER = ADFLogger.createADFLogger(UsersVOImpl.class);
    private long hitCount = 0;
     * This is the default constructor (do not remove).
    public UsersVOImpl () {
     * executeQueryForCollection - overridden for custom java data source support.
    protected void executeQueryForCollection (Object qc, Object[] params, int noUserParams) {
         List<String> usersList = new ArrayList<String>();
         usersList.add("Brad");
         usersList.add("Adam");
         usersList.add("Aaron");
         usersList.add("Fred");
         usersList.add("Charles");
         usersList.add("Charlie");
         usersList.add("Jimmy");
         Iterator usersIterator = usersList.iterator();
         setUserDataForCollection(qc, usersIterator);
         hitCount = usersList.size();
         super.executeQueryForCollection(qc, params, noUserParams);
    } // end executeQueryForCollection
     * hasNextForCollection - overridden for custom java data source support.
    protected boolean hasNextForCollection (Object qc) {
         Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
         if (usersListIterator.hasNext()) {
             return true;
         } else {
             setFetchCompleteForCollection(qc, true);
             return false;
         } // end if
    } // end hasNextForCollection
     * createRowFromResultSet - overridden for custom java data source support.
    protected ViewRowImpl createRowFromResultSet (Object qc, ResultSet resultSet) {
         Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
         String user = (String)usersListIterator.next();
         ViewRowImpl viewRowImpl = createNewRowForCollection(qc);
         try {
             populateAttributeForRow(viewRowImpl, 0, user.toString());
         } catch (Exception e) {
             LOGGER.severe("Error Initializing Data", e);
             throw new JboException(e);
         } // end try/catch
         return viewRowImpl;
    } // end createRowFromResultSet
     * getQueryHitCount - overridden for custom java data source support.
    public long getQueryHitCount (ViewRowSetImpl viewRowSet) {
         return hitCount;
    } // end getQueryHitCount
    @Override
    protected void create () {
         getViewDef().setQuery(null);
         getViewDef().setSelectClause(null);
         setQuery(null);
    } // end create
    @Override
    protected void releaseUserDataForCollection (Object qc, Object rs) {
         Iterator usersListIterator = (Iterator)getUserDataForCollection(qc);
         usersListIterator = null;
         super.releaseUserDataForCollection(qc, rs);
    } // end releaseUserDataForCollection
} // end class
<af:inputListOfValues id="userName" popupTitle="Search and Select: #{bindings.UserName.hints.label}" value="#{bindings.UserName.inputValue}"
                                              label="#{bindings.UserName.hints.label}" model="#{bindings.UserName.listOfValuesModel}" required="#{bindings.UserName.hints.mandatory}"
                                              columns="#{bindings.UserName.hints.displayWidth}" shortDesc="#{bindings.UserName.hints.tooltip}" autoSubmit="true"
                                              searchDesc="#{bindings.UserName.hints.tooltip}"                                          
                                              simple="true">
                          <f:validator binding="#{bindings.UserName.validator}"/>                      
</af:inputListOfValues>

I have found a solution to this issue. It seems that when using a programmatic view object which has a transient attribute as its primary key you need to override more methods in the ViewObjectImpl so that it knows how to locate the row related to the primary key when the view object records aren't in the cache. This is why it would work correctly sometimes but not all the time. Below are the additional methods you need to override. The logic you use in retrieveByKey would be on a view object by view object basis and would be different if you had a primary key which consisted of more than one attribute.
@Override
protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, Key key, int i) {
    return retrieveByKey(viewRowSetImpl, null, key, i, false);
@Override
protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, String string, Key key, int i, boolean b) {
    RowSetIterator usersRowSetIterator = this.createRowSet(null);
    Row[] userRows = usersRowSetIterator.getFilteredRows("UserId", key.getAttribute(this.getAttributeIndexOf("UserId")));
    usersRowSetIterator.closeRowSetIterator();
    return userRows;
@Override
protected Row[] retrieveByKey (ViewRowSetImpl viewRowSetImpl, Key key, int i, boolean b) {
    return retrieveByKey(viewRowSetImpl, null, key, i, b);

Similar Messages

  • How to select an item from a dropdown menu using Enter key

    A website I frequently use opens with a dropdown menu. Using my former browser, I was able to select the an item from the dropdown list by hitting the first letter with my keyboard and then hitting Enter. (Think of entering an address and selecting TX from a dropdown menu of states. Often you can hit T twice to get to TX and then the Enter key will advance the cursor to the zip code field.) Since converting to Firefox, the Enter key no longer works to advance to the next screen...I now have to move the mouse to a "Go" button and click it after selecting the desired item from the downdown menu. It's a small thing, but constantly switching back and forth between mouse and keyboard is becoming annoying. Is there an option in Firefox to select items simply by highlighting them in the dropdown menu and hitting the Enter key, instead of having to use the mouse to click a "Go" button? Thanks

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • I upgraded to lion, now that I am restarting my mac, it is asking for a password. mind you i never set a password in the begining. so i used my start up cd and re set the password and restarted my mac only to be faced with the same delima. user password.

    I upgraded to lion, now that I am restarting my mac, it is asking for a password. mind you i never set a password in the begining.
    So i used my start up cd and re set the password and restarted my mac only to be faced with the same delima. user password please.
    I am currently in safe mode, otherwise I can't log on to mymac
    Please help, anyone

    thank you to all who responded. the final line was that I had to reboot and loss all of my info.
    this was per apple store intelligence.

  • Mapping in BPM - set value of collection item

    Hello,
    is it possible to set value to exact item of collection in mapping step in netweaver BPM?
    I need something like set(<collection_variable>,<item_index>,<item_value>)  - so exact opposite of GET generic function, which gets specific item from collection.
    Is it possible in NW BPM?

    You dont have to apologize. I didnt meant that as offend.
    I appreciate the possibility to discuss that topic with somebody, because discussion itself sometimes shows other perspective to the problem, which can lead to solution
    Of course I wrote EJB function to solve that - but I cant believe that it isnt standard solution to that pretty common use case.
    I think, that problem lays in very limited implementation of XPath into Netweaver BPM. I will bet my left hand, that in some future SP of BPM will SAP introduce something like this:
    myCollection[1]/notificationId = notificationId
    which is standard XPath way to do that

  • How to get first item of hashMap w/out knowing the key

    Hi
    can someone tell me if there is a way to get first item from a hashMap when you dont know what the key is. as the get method expects a defined 'key'
    reason I am asking this:
    I am using struts 2 UI <s:radio> tag. this tag takes a hashmap and creates radio maps. it has a 'value' attribute and if something is passed to this attribute then that radio button is checked by default. the list that contains radio buttons is created dynamically so i dont know what is actually in the hashMap key's. but i do know that key's are string.
    so just wondering if there is a way to get first item from a hashmap without knowing the key...

    thanks for the quick reply.
    posted in java forums because thought it was a java API/workaround question. gave a little history because i didnt want people to start questioning my use of HashMap for this purpose..
    anywhose..i've found a workaround.
    If someone has a similar problem:
    as the hashmap is being populated dynamically....set a String member of class to contain the first key thats being put in the hashmap. then have struts tag pick up that value.
    also, through your post and reading hashMap api...its usefull to know that hasMaps do not gurantee the order of elements in it. So now I am using a TreeMap.
    Thanks

  • My iPad, Macbook and Apple TV are all set up with the same iCloud email address.  I bought the iPhone 6 and accidentally set the iCloud up with a different email.  My phone will not let me change the email address to be the same as my other devices,

    My iPad, Macbook and Apple TV are all set up with the same iCloud email address.  I bought the iPhone 6 and accidentally set the iCloud up with a different email.  My phone will not let me change the email address to be the same as my other devices, it tells me that email is already being used. How do I delete the iPhones iCloud account and reinstall it to match my other devices.

    Yes it will, just sign out, then sign back in with the correct address.
    Settings>iCloud>Sign Out.

  • I am trying to set up my newly purchased Apple TV but when I enter my network password while setting up, I am not able to enter the Submit button, any idea how to hit the visible submit button that is visible on screen but not responding?

    I am trying to set up my newly purchased Apple TV but when I enter my network password while setting up, I am not able to enter the Submit button, any idea how to hit the visible submit button that is visible on screen but not responding?

    You need to use the right arrow on the remote to go all the way to the right. The submit button will be highlighted and you can then press select on the remote to proceed.

  • [svn:osmf:] 14758: Fix FM-556: When MediaPlayer enters error state, capabilities should be set to false, and capability change events should be dispatched.

    Revision: 14758
    Revision: 14758
    Author:   [email protected]
    Date:     2010-03-15 12:27:47 -0700 (Mon, 15 Mar 2010)
    Log Message:
    Fix FM-556: When MediaPlayer enters error state, capabilities should be set to false, and capability change events should be dispatched.  Also fixed typo in one of the capability change event names.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-556
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/events/MediaPlayerCapabilityChangeEvent.as
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamLoadTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/media/TestMediaPlayer.as

    Well, I can tell you that this kind of error is not OS related, but rather a HW thing.  It happens where there is a general detection of something going wrong.  Sometimes it can happen randomly and might not be an indication of a problem.  But sometimes it can be caused by things that are improperly functioning within the system like bad capacitors. 
    Unfortunately I don't really know what to do about such things except give you machine a proper inspection.  But if things are working fine, and continue to do so, I wouldn't worry about it.  If it becomes a regular occurance, then I'd worry.

  • Hello! I want to set up an appointement with Genius Bar but when i choose the available date and try to confirm there is this message appears : We're sorry. There was an error processing your request. Click OK to try again. HELP ME PLEASE

    Hello! I want to set up an appointement with Genius Bar but when i choose the available date and try to confirm there is this message appears : We're sorry. There was an error processing your request. Click OK to try again. HELP ME PLEASE

    I have called the store with the same problem but the answer is this must be done on line. I was told to use a different browser but it has made no difference - I am still having the same problem

  • How do you set up a password for a wireless network when using an Airport Extreme?

    How do you set up a password for a wireless network when using an Airport Extreme wireless router?

    Thanks for the updated information.
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the AirPort Extreme icon, then click Manual Setup
    Click the Wireless tab below the row of icons
    Check to make sure that the setting for Wireless Security reads either WPA2 Personal or WPA/WPA2 Personal
    Enter a Wireless Password and Verify Password
    Click Update to save any changes and wait a full minute for the AirPort Etreme to restart

  • I am using outlook express for my mail. When using internet explorer on PC I could set it up so I could simultaneously see all my inboxes, the mail details and a message preview. Can I do this  on my Mac?

    I am using outlook express for my mail. When using internet explorer on PC I could set it up so I could simultaneously see all my inboxes, the mail details and a message preview. Can I do this  on my Mac?

    About accessing using a browser: I can get in using Firefox or Safari, butI cant set the page up to see all my inboxes at the same time (so I can file emails appropriately) or get a preview to save opening every mail

  • Javascript: set value of hidden item

    Hi,
    I have a select list and a hidden item on my page, after select a value, I want to write this value (and a little bit more) to the hidden item.
    So I have done the following...
    applied to page html header:
    <script language="JavaScript" type="text/javascript">
    function setExpress(item_id)
    html_GetElement('P230_HIDDEN').value = 'Test ' + html_GetElement(item_id).value;
    </script>
    and in selection list I set the HTML Form Element Attributes to onChange="setExpress(this.id); .
    But nothing is written to the hidden item. When I make it a text field it works correct.
    Isn't it possible to set a value of hidden item by javascript? Is there another way to do this (without computation)?
    Thanks for help
    chrissy

    Hello chrissy,
    I don't see the connection between the item being Hidden or Text. The item id stays the same, and so the JavaScript reference to it.
    It is possible to assign values to hidden items using JavaScript, just as you did. In the following page - http://htmldb.oracle.com/pls/otn/f?p=22814:8
    -you can see a working example of your situation – select list populate a hidden item, then display by using alert.
    After selecting from the list you should TAB out, so it will fire the JavaScript event. In your example, you were using onChange. I think that could be problematic in cases were the default value (first value) of the select list is the one chosen – no change there. In my example, I'm using onBlur.
    You can see the JavaScript on the source page.
    Hope this help,
    Arie.

  • Powershell Iterate through webs and lists to get Document ID Value of first item

    After some some trial and error I came up with the follow script. But it's so slow! And seems to be missing my document centre - it has about 80000 items in it.
    Two questions: Can I make this quicker? and why can't it handle getting results from the document centre?
    $webs = (Get-SPSite "http://portal...." | Get-SPWeb -Limit all -ErrorAction SilentlyContinue)
    if($webs.count -ge 1 -OR $webs.count -eq $null)
    foreach($web in $webs)
    $lists = $web.Lists
    foreach($list in $lists)
    if ($list.BaseType -eq "DocumentLibrary" -OR $list.BaseType -eq "GenericList")
    $item = $list.Items[0]
    if (($item -ne $null) -and ($item["Document ID Value"] -ne $null))
    $finalstring = $item["Document ID Value"].ToString()
    write-output $finalstring | Out-File "C:\scripts\results.txt" -append
    $web.Dispose()

    I thought that pointing to items[0] would literally just grab the first item.
    So what do I do here? How can I use an spquery in my code? I'm confused in the order and the exact sytax I would use the spquery.
    Thanks for you help so far Alex.
    Edit: Amended my code, is this correct?
    Add-PSSnapin Microsoft.Sharepoint.PowerShell
    $webcount = 0
    $listcount = 0
    $itemcount = 0
    $itemid = ""
    $TimeStamp = Get-Date
    $Date = $TimeStamp.ToShortDateString()
    $Time = $TimeStamp.ToShortTimeString()
    $webs = (Get-SPSite "Http://portal..." | Get-SPWeb -Limit all -ErrorAction SilentlyContinue)
    $query = New-Object Microsoft.Sharepoint.SPQuery
    $query.Query = "<Where><IsNotNull><FieldRef Name='ID'/></IsNotNull></Where>,<OrderBy><FieldRef Name='_dlc_DocId' Ascending='True'/></OrderBy>"
    $query.ViewFields = "<FieldRef Name='_dlc_DocId'/>"
    if($webs.count -ge 1 -OR $webs.count -eq $null)
    foreach($web in $webs)
    $lists = $web.Lists
    foreach($list in $lists)
    if ($list.BaseType -eq "DocumentLibrary" -OR $list.BaseType -eq "GenericList")
    $listcount += 1
    $items = $list.GetItems($query)
    foreach ($item in $items)
    if ($item["_dlc_DocId"] -ne $null)
    $itemid = $item["_dlc_DocId"].ToString()
    if ($itemid -ne "")
    $itemcount += 1
    $finalstring = $Date + " ; " + $Time + " ; " + $web.url + " ; " + $list.title + " ; " + $itemid
    write-output $finalstring | Out-File "C:\scripts\results.txt" -append
    break
    $webcount += 1
    $web.Dispose()
    Write-Host "Amount of Webs checked:"$webcount
    Write-Host "Amount of Document Library Lists:"$listcount
    Write-Host "Amount of valid IDs:"$itemcount

  • Setting value of an item using item_id

    howdy,
    You know when you set value of a text or display item using its name, ie:
    :block_name.item_name := 'abc';
    Well, I would like to do the same, but using its item_id.
    Can it be done?
    The reason behind it is that, I have 50 text items on canvas. They all follow some naming convention, and I would like to set their values in some elegant loop, rather than writing a page-long code referencing their :block_name.item_name.
    thanks and kind regards
    mz.

    Would the COPY built-in work for you? For example 50 items called genericItem1, genericItem2, ...
    for i in 1..50 loop
    COPY('new value', 'block.genericItem' || to_char(i));
    end loop;
    Regards,
    Candace Stover
    Forms Product Management

  • Setting custom table attribute set value in region item table

    Dear all
    I am working on oracle application customization and extension in
    oracle JDeveloper R12. I am finding a difficulty in an query region of
    a OA framework page
    My Entity object is on the table FWK_TBX_ADDRESS table
    and VO objects has the fields or columns
    AddressName, AddreessId, TownC-OrCity
    what I am doing shown in the following steps
    1-I select region using wizard option
    2-select my AM and VO
    3-select table as style
    4-shuttle all attributes associated with VO
    5-in region items table , select the Attribute set field for AddressName attribute and click the serach flashligh icon
    6-After that select the browse button , using the package browser , expand down to oracle > apps > fnd> framwork > toolbox > attributesets, then oK
    7-select the serach control , and then it list all the attributes set related to fwkTbxEmployees table like the following
    /oracle/apps/fnd/framewok/toolbox/attributesset/FwkTbxAddress/AddressName
    Now the problem which I am facing now is that if I have custom table suppose "xxEmployees" and have attributes or column
    for example employeeId, employee_name, email etc. what would I do to search these attributes when I come to step number 6 which
    I mentioned above. from where in which package I can find these attributes to set attributesset value. in above i find these attributes
    in /oracle/apps/fnd/framewok/toolbox/attributesset/FwkTbxAddress/AddressName
    but in my case for attribute lie employeeId or employee_name from where I can get this how can I set the value of attribute set field in regin item
    table in step 5
    Noman

    I dont know what u trying to ask
    My problem is just that I want to set the attribute set value of my attribute employee_name, same is AddressId in fwk_tbx_address
    ame is AddressId in fwk_tbx_address found on
    /oracle/apps/fnd/framewok/toolbox/attributesset/FwkTbxAddress/AddressName
    where can I find my attribute employee_name
    in jdeveloper

Maybe you are looking for