Can't select when JList populated by LOV

I'm at a loss here...
JDev 10.1.2.1 (1913)
I'm creating a simple Swing Shuttle panel. I want standard action, i.e. when the 'shuttle' button is pressed, the selected items in JList1 move to JList2.
I first created this with JList1 bound to a VO. I quickly realized that I couldn't remove elements from the list without removing the appropriate rows from VO...tried to do that but ran into errors.
Ok, so i figured I'd create a programmatic VO and followed the documentation to populate this with a LOV from the db-backed VO attribute I want.
The problem is that all list values are grayed out and un-selectable
Steps:
1 - Create DB-backed VO and programmatic-backed VO with same attributes (I created these using the Ename field from Scott.EMP)
2 - Create JPanel
3 - Find the programmatic-backed VO on the Data Control palette
4 - Expand to find the attribute I want to show in my JList; select "Drag and drop as List"; drag onto my panel
5 - Open the List binding editor from the Structure window
6 - On the LOV Update attributes tab I select the DB-backed VO as the source and the programmatic VO as the target
7 - On the LOV display attributes tab I shuttle over the attribute I want to display (Ename)
I tried the three different selectionModes...I compared the properties of the VO-backed JList with the LOV-backed list and can't find a difference. I fooled around with the "Updatable" settings in the VO...
Any ideas why this doesn't work as i expect?
thanks
John

I'm not sure that there is anything in the ADF Bindings to help you here. What we have done is to programatically execute the query and add each Row to the JList. You will need a custom renderer to the JList so that the list knows which attribute from the Row to display. Then when you shuttle the row over, you just remove it from the first JList and add it to the 2nd JList. It is also very easy to create a generic ListCellRenderer that knows how to display Row objects. Here is one that we use:
import java.awt.Component;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;
import oracle.jbo.Row;
public class ADFRowListCellRenderer extends JLabel implements ListCellRenderer {
  private String attributeName = null;
  public ADFRowListCellRenderer(String attributeToDisplay) {
    this.attributeName = attributeToDisplay;   
  public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {  
    Row row = (Row) value;
    String fieldValue = null;
    if( row != null ) {
      Object objectValue = row.getAttribute(attributeName);  
      if( objectValue != null ) {
        fieldValue = objectValue.toString();  
    setText(fieldValue == null ? "" : fieldValue);
    setOpaque(true);
    setBackground(isSelected
           ? list.getSelectionBackground()
           : list.getBackground());
    setForeground(isSelected
           ? list.getSelectionForeground()
           : list.getForeground());    
    return this;
}One thing to remember is that a Row instance has some internal id assigned to it, so if you re-execute the query, your list's Row references will be invalid. If you have to re-execute the query, then you will need to clear the JLists and reload the Rows.
Hope this helps
Erik

Similar Messages

  • Can't select when I click in a box of type – is it a bug?

    When I click in a box for the first time I can't select the type – can you?
    click click bloody click.
    Nothing happens.
    I have to click again and highlight the text.
    Inevitably– it's driving me around the bend.

    I am not the brightest person sometimes.
    I put the mouse in the text and click.
    Then I click and I click and I click and I click ( I can send you a film) and nothing happens.
    Do I need to buy a different type of computer?
    I have only been using indesign for 10 years.
    And this happned when I upgraded to CC.
    Sorry for being a twit.

  • How do I create Themes/Chapters in my video before burning to DVD so that Scenes can be selected when DVD is loaded to player?

    How do I create Themes/Chapters in my video before burning to DVD so that Scenes can be selected using on screen icons when DVD is loaded to player?

    "I don't know what you mean by this. There are no chapter markers in FCP." - you puzzle me by this! Yave You ever made some DVDees after editing in FCP 7? Every chapter in the timeline could be transfered to DVD Studio Pro, and then used in DVD navigation. This is very important feature, decause you don't have to lookfor some parts of your video while creating navigation! Less work - more joy! Another downscore of FCPX!

  • Which of the distribution can I select when I setup webmin?

    I ran the setup.sh of webmin, it asked for my distribution of linux. There was no archlinux, which one can I select? gentoo? slackware? FreeBSD? Or RedHat?
    I have selected RedHat9, It can worked, but not perfect. Because the service script is not in /etc/rc.d/init.d

    You can update it online from within webmin.
    Under webmin configuration, upgrade webmin, the default is to get latest from the web which works fine. (I have just done it)

  • Can I select when do i want to write my data into a file?

    What I want is like,
    When I click a button as ON then only it goes an writes the data into a spreadsheet.
    Now i have made the bolllean so that it will show TRUE when you have to write...but if FALSE nothing should happen...
    and I cant see any option in Write to Spread Sheet function for it..
    So can you help me out with what should I do
    Solved!
    Go to Solution.

    You put the Write to Spreadsheet file in a case structure.
    I would recommend looking at the online LabVIEW tutorials
    LabVIEW Introduction Course - Three Hours
    LabVIEW Introduction Course - Six Hours

  • How to create a multi column list item and select these values from a LOV

    Hi all,
    My requirements are:
    1) create an LOV which holds the productno, productname and productprice fields (this is working)
    2) at run time, select one record from LOV and populate the list/grid with this selected record values of productno, productname and productprice fields, so we are showing them on the form in the form of a table/grid (not working)
    3) be able to select multiple records from LOV and be able to populate the list item with multiple records (not working)
    4) have two more columns in the list/grid, for productquatity and total price (not wokring)
    Please help me.
    how can i create this grid or list in oracle
    whats the possible way of acheiving this in oracle

    If you use a list item to display multiple columns then you'll need to use a fixed-width font. You can achieve a similar look with proportional fonts by using a normal block and setting the fields' bevel to 'None'.
    Each column in the LOV has a Return Item property (under Column Mapping Properties). Set this to a :block.item reference for each column to bring the data back into those referenced fields.
    You can't select multiple records from an LOV. For this you will need to create your own form. Check the help for system.mouse_button_modifiers to see how to respond to Ctrl+click and Shift+click.
    To add columns just modify the LOV's record group's query.

  • Can not select TV speakers when connected via HDMI

    I have a MBP fully updated connected to a Sony TV vis HDMI/miniport.  Up until today this configuration was working fine.  Suddenly, I can no longer select the HDMI speakers in my audio preferences.  They are recognized and appear on the list but when I select them it has no effect.  Before today, when the TV was connected the HDMI output would be automatically selected and I could not access the volume control from the menu bar, which is the way I prefer it. 
    I have restarted with no success in changing this behaviour.  If I open/close the lid, the sound goes to the proper settings for about 2s but then the HDMI speakers are de-selected and the built-in speakers are highlighted.  I can manually select the TV speakers but the setting has no effect.
    However, I *am* getting audio output through the TV but can not control volume from the mac or any app.  I slide the volume slider on the menu bar and the audio output does not change.  The sound is also playing from the laptop speakers which is highly annoying.

    and now there is no audio through the TV at all.  TV works fine with other inputs such as PS3.  Any help?

  • Drop down menus on iPad, the first selection in the drop down will not load as a selection when using safari, what can I do?

    Drop down menus on iPad, the first selection in the drop down will not load as a selection when using safari, what can I do?  I use this for my mobile, on-site auto repair business and not being able to call up repair and diagnostic info and reference for some cars is troublesome for sure. It works fine on the computer and I have installed a remote desktop app as a workaround but it is unreliable because the desktop is not business dedicated and may be off or in use at the time. So is there a known fix for this?
    Let me paint a more descriptive picture, visualize 4 drop down selection menus, first one is for year, next one is for make, 3rd one is model and the last one is for engine size/type. If I wanted to choose a 2012 vehicle it wont work because it is the top selection on the list. This can be forced by selecting any other year and then coming back to 2012. Ok fine, but then let's say I wanted to choose Acura as the make, well it won't take it because again it's the top selection. Again you work around it be selecting any other make and coming back to Acura. Ok now select the model, same trend follows. But now since most Acura vehicles come with dedicated engines and no optional engines I have only 1 selection in that final drop down menu and it will not take my selection and therefore never let me proceed to the info I need.
    This is also true when ordering parts from my wholesaler's website, they use drop downs and I can only get to that last drop down and then I'm stuck. This is blindingly frustrating, what options do I have. I'm not opposed to any avenue at this point.

    Did you ever figure this out? I bought my iPad last week to use in my business as well. I assume you are trying to use alldata? That is where I noticed this same issue. I had problems with identifix working with safari but downloaded a different browser and that works fine. Alldata does not work with either browser. The main difference is that on identifix if there is only one engine selection, it automatically selects the only option and continues to the home page. With alldata you have to make the selection manually even if there is only one option. Honestly if I can't get this to work I am going to return the iPad as it looses a significant amount of usefulness to men

  • When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page.

    When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page. I don't want to have to check off an additional 5 or 6 attributes each time I print out contact information. Is there a way to change the default setting for printing lists, so it is not just "phone," "photo," and "job title?"

    I have a user who wants to do this same thing. I did not find any way either to default the attributes to anything other than what you see the first time. Seems like such a trivial thing, hard to believe they do not allow it. I did find a program for this called iDress but I can't seem to download it from any links on the Internet. Not sure if it is free or not, but it was recommended by a link on the Mac support site.

  • I would like to use GarageBand to remaster downloaded music files that are in iTunes.  Poorly mastered files keep clipping and damaging my speakers.  When I try to use an iTunes file as a new project, it greys out the iTunes songs so I can't select them.

    I would like to use GarageBand to remaster downloaded music files that are in iTunes.  Poorly mastered files keep clipping and damaging my speakers.  When I try to use an iTunes file as a new project, it greys out the iTunes songs so I can't select them.  Any ideas?

    As I said - look whether your original file is damaged or not. If not, I wouldn't change it and find out what in your system makes it sound like it's clipping.
    Good sound file, with volume maxed out. No need to change anything.
    The same song clipped - no chance to repair.

  • How We can restrict the max no of Selections in JList

    Hi,
    How We can restrict the max. no of selections (at random selections) in JList (ex. max No of of selections is 3 in a JList of having 50 items.)
    Thanks for your advise in advance.

    Hello Satyaki De.
    Thank you very much for your suggestion but my Private information is totally apart from this question & I already I have changed each and every information from the question.
    Thanks
    Kamlesh Gujarathi
    [email protected]

  • When I open a PDF file and I try to Save As to my shared drive I can't select it from the dropdown

    When I open a PDF file and I try to Save As to my shared drive I can’t select it from the dropdown menu. (See screenshot).
    When I select on the left side “Computer”, then my shared drive is available. (See screenshot).

    Hi staceye,
    Where are you creating the PDF file, and what is the error that you're receiving? Is it a file that is saved in your Acrobat.com online account?
    Best,
    Sara

  • Can't select "include book documents" when creating index in InDesign CC

    I'm trying to make an index for several dokuments in a book. I've made the index but when I try to generate the index the checkbox is greyed out so I can't check it. Do You know what's wrong?

    Thank You. That worked well.
    One more question: It looks as if the index does not include the words of all the documents in the book. Is it something I do wrong?
    Thanks
    Henning
    Fra: Peter Spier <[email protected]<mailto:[email protected]>>
    Svar til: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Dato: onsdag 10. juli 2013 13:04
    Til: Henning Kristoffersen <[email protected]<mailto:[email protected]>>
    Emne: Can't select "include book documents" when creating index in InDesign CC
    Re: Can't select "include book documents" when creating index in InDesign CC
    created by Peter Spier<http://forums.adobe.com/people/P+Spier> in InDesign - View the full discussion<http://forums.adobe.com/message/5491834#5491834

  • 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 select text when export in HTML and Images

    I am entirely new to Fireworks and I can't find anyone to teach me Adobe Fireworks. I followed some youtube tutorials but most of them are vague. I am still figuring the way to export from Fireworks to Dreamweaver, without affecting its contents like bitmap images and the text. When I export in HTML and Images format and opened the htm file, I can't select the text I've inserted in Fireworks. Can anyone tell me what I should do?

    I cant scroll below or above viewable section of text in any of my Macbooks, iMac, Mac Mini. Never have been able to, never could, except by pressing the arrow keys whilst selecting, to move up or down.
    Its stupid
    I dont have flash installed (never will do since my first virus of video ad sound running in background from Cnet was downloaded and kept returning until i deinstalled flash).
    I believe that this is a universal issue because none of my Macs can scroll out of screen when selecting text, which as a webmaster and developer, is a pain in the butt
    My issue is not in word documents, its in everything

Maybe you are looking for

  • HT1373 My ipod shuffle is no longer charging ?

    My Ipod shuffle is not charging...what do I need to do to correct this?

  • Image Size Command!

    I really need help I try to change an image size and it just says "Couldn't complete Image Size Command because not enough memory (RAM)" how can I fix it?  

  • How to Control Browser Our Own way

    hi, my task is how to handle browser events on my own control.Let me explain my problem clearly.Now my pc is stand alone(dont having internet connection) just serail communication to other pc.Some how i retrieved search results from interenet connect

  • Itunes movie not working

    i purchased the "hancock" movie recently, it does not work in my iphone and so with my pc laptop, it stops all the time. also, do we have a video to use at the old iphone? i feel like i need to know more about this. manual doesn't explain that much i

  • How to Transport Personalized mail?

    Hi Gurus How to Transport Personalized mail From Development servers to quality sever and also Production Server Cheers Mahi