Selected Items

I tried using
UIManager.put("Menu.highlight", Color.ORANGE);but the color of my JMenu when selected is still purple.
What should I do???
Thanks!!!

In JDK1.3 there is no 'highlight' property so I use:
UIManager.put("Menu.selectionForeground", Color.blue);
UIManager.put("Menu.selectionBackground", Color.red);
I have a program that shows the properties that can be set by component:
http://www.discoverteenergy.com/files/ShowUIDefaults.java

Similar Messages

  • Using checkboxes to select items in a Spark DataGroup/List?

    I have a DataGroup from Catalyst, laid out like a tile list:
    I'd like to do something a bit different, in that I'd like to allow people to multi-select items in the list using those checkboxes instead of the usual command/control-click.
    The checkbox, label and image are in the itemRenderer.  Is there an easy way that I can have that checkbox toggle the selected state of its list item?

    Hi,
    Using the checkbox as a selection is easy enough as all you have to do is add a change event to the checkbox in the renderer and then in the event
    selected=mycheckbox.selected;
    The fun is how to handle the list click event from the checkbox you can stop propagation but if the item is clicked it will reset the selected indices.
    There is a few ways to handle this
    when processing the list don't use the selected indices just use the checkbox value to determine whats selected
    disable the listbox click event so items have to be selected with the checkbox
    or the most complex lots of overriding so that click acts like a ctrl/click and the checkbox/itemclick can toggle each other.
    David

  • Combox Box not displaying selected item

    Below is the code I'm using to try to capture and display the
    selected item from a ComboBox:
    private function
    changeProjectTypeSelection(event:Event):void{
    projectTypeChange.text+=event.currentTarget.selectedItem.cboProjectType
    + " " +
    event.currentTarget.selectedIndex + "\n";
    Then the ComboBox:
    <mx:ComboBox fontSize="12" x="93" y="83" width="110"
    id="cboProjectType" dataProvider="{projectTypeArray}"
    labelField="projectTypeName" selectedIndex="0"
    click="changeProjectTypeSelection(event)"></mx:ComboBox>
    Then the TextInput:
    <mx:TextInput id="projectTypeChange" x="248.95" y="84"
    width="121"/>
    I know there's something wrong with the Actionscript code...
    just haven't figured it out. Any suggestions would be greatly
    appreciated!

    I've almost got it...
    private function
    changeProjectTypeSelection(event:Event):void{
    var i:int;
    for(i=0;i<projectTypeArray.length;i++){
    if(projectTypeArray.getItemAt(i).projectTypeName ==
    event.currentTarget.selectedItem.projectTypeName){
    projectTypeChange.text+=projectTypeArray.getItemAt(i).projectTypeName
    + "\n";
    Alert.show(projectTypeArray.getItemAt(i).projectTypeName +
    "FirstAlert");
    //Alert.show(event.currentTarget.selectedItem.projectTypeName +
    "SecondAlert");
    I just can't seem to be able to reset the value in the
    textInput field. I've tried setting it equal to spaces in several
    places, but it won't change after the first selection. Any ideas?
    Thanks for any suggestions!

  • Getting selected item from combobox itemrenderer and storing in object

    Hi Guys,
    Can anyone help me in this regard. Its very urgent.
    I have a combo box itemrenderer in datagrid column. I want to get the user selected item from the dropdown of the row(s) (User may select values from combo box from multiple rows of datagrid) and corressponding values of all other columns of the rows and store it in an object . Then pass this object to database to update only those rows that user has changed.
    I am able to get the selected item from combo box using "event.currentTarget.selectedItem" and corressponding values of all other columns of the rows using "valueSelect.ID", etc where valueSelect is object which contains data for datagrid. But am stuck up with, how to store the selected item value of the combobox  and corressponding values of all other columns of the rows into an Object ?.
    Can anybody help me with sample to store selected item from combobox and its corressponding values of all other columns into an object which i can send to db...?
    Kindly help me in this regard.
    Thanks,
    Anand.

    Hi!
    Are you using a collection of VO or DTO as the dataprovider of the combobox component?
    If so, have you created some attribute there to control the user's selection in the combobox?
    For instance:
    private var selected:Boolean = false;
    If your solution fits this approach, you may create a new collection that contains just the objects that were selected by the user, it means you can loop through the datagrid's dataprovider and only insert in this new collection those objects that have the attribute "selected" set to true.
    For instance:
    private function getSelectedRecords(datagridDataProvider:ArrayCollection):ArrayCollection
        var newCollection:ArrayCollection = new ArrayCollection();
        for each (var item:Object in datagridDataProvider)
            if (item.selected)
                newCollection.addItem(item)
        return newCollection;
    Afterwards, you may serialize this new collection with your back-end.
    Hope it helps you!
    Cheers,
    @Pablo_Souza

  • Get Selected Items from ListBox

    Hi,
    How do I get the Selected items of a List in Flex.
    I am using a multi-select List.
    Thx

    Never mind..I got it.
    it as simple as that:
    Alert.show (lst.selectedItem.fieldname);
    ;)

  • Removing selected items from listbox

    Hi ADF Experts,
    I have a selectmanylistbox with few values displaying in UI and a Remove Button at the bottom.
    User selects certain items from the listbox and clicks on Remove button. The selected items should be reomved. Can anybody suggest how to do this.
    Thanks,
    Animesh

    Duplicate of https://forums.oracle.com/thread/2562542
    User, please don't ask the same question multiple times. If you don't get the answer you want it may be because you did not give the right information and or use case me understand.
    Timo

  • How to get the selected items from listbox

    Regarding listbox i have two questions
    1) I want to get the selected items as per the order in which ihave selected.Presently i'm getting in the ascending order.For example after selcting the 1,2,6 if i select 3 then its giving 1,2,3,6.But i want it in the order 1,2,6,3
    2)I want to select items from a single list box to many other listboxes.(ie) my first selection should goto first,second one to the second listbox and like this.How should i write the logic.
    please give me a suggestion.

    In order to have the selected items line up in accordance to the selection order, please do it one at a time. (That's the limit for that VI)
    If you need more than that (i.e. to regconize which item clicked first and which one comes later), you may have to figure it out ya
    Wish you good luck. Perhaps, someone else has a already made vi.
    Cheers!
    ian.f
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com

  • How to find total size of selected items in library

    My library contains much more than my 2GB Nano can hold. I frequently change the content of the Nano with songs and books. How can I keep track of the total size of items I'm selecting for the next Nano update to speed my update? Presently I can only guess what to unselect if the selections are of greater size than my Nano will hold.

    There is no direct way to accumulate total file size when selecting a subset of songs within the Library or a Playlist.
    The only way you can manage this is to create an empty Playlist that you can drag songs into. It will accumulate the total size of the songs as you deposit them into it (as described by StarDeb above).
    If you get to a size greater than the nano will hold, then remove one or more songs from that Playlist.
    There is no 'running-total' of only the selected items like Windows Explorer does. Sorry.

  • No selectable items exist for purchase requisition l_banfn

    Hi,
    While creating PO with ref to PR getting the below error :
    no selectable items exist for purchase requisition l'banf .
    Checked if the PO is created, its not created,.
    checked if the item is blocked/cancelled/deleted. Nothing is set.
    PR looks fine. Dont know if any authorization data is missing?

    Check the status tab in ME53N whether all the qty in PR are already used up
    Or
    Check the line item in PR whether it is deleted
    Edited by: Karthik on Jul 20, 2011 12:37 PM

  • How to create a report  based on selected item from Select list?

    Hi,
    I have created a tables_LOV based on:
    select table_name d, table_name r from user_tab_cols
    where column_name like '%_type%'
    Then I created a page item ListOfTables,  Display as select list and pointing to tables_LOV.
    I run the page, and i can select the table i want from the drop down list.
    How to create a report  based on the selected item? (ex: select * from selected_table)
    many thanks in advance
    Salah

    Hi Salah,
    Allright, have a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
    I think that simulates what you're trying to accomplish. I've set up the simplest method I could think of.
    The report is based on an apex collection. If you are not familiar with that, you should study the documentation: APEX_COLLECTION
    To recreate my example you should:
    1) create an (interactive) report on your collection
    SELECT *
       FROM APEX_collections
    WHERE collection_name = 'MY_COLLECTION'
    2) create a page_item select list for the tables you want to display (in my case this is called "P38_TABLES" )
    3) create a dynamic action that triggers on change of your select list page_item. The dynamic action must be a PL/SQL procedure perfoming the following code:
    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
    end;
    Make sure you add your page_item to the "Page Items to Submit" section.
    4) Add an extra true action that does a refresh of the report region.
    Here are two pictures describing the da:
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA1.png
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA2.png
    Good luck and regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • How to disable a lead selected item in a radio button group ?

    Hi,
    I have a radio button group and there are entries to create radio buttons dynamically. means there is only one radio button group in the UI design and in runtime I will be having two radio buttons (For ex: Yes and No ) . Now If I want to disable either Yes or No radio button, I am unable to do so. because If I disable the radio button group it disables both.  So, I can have lead selected item for ex: Yes which I want to disable. I want to know specifically how this Yes button to be disabled by taking lead selected index item.
    Please help.
    Thanks
    Praveen

    Try setting the radio button value of the lead selected button to abap_false/space.

  • How can a classic report be filtered using one select item and dynamic action?

    APEX 4.2.1
    DB 11g
    I have a page with 4 reports on it.  The top report is an interactive report and the following 3 are classic reports.  The users would like to be able to use a select list to filter the 3rd report by PO line number without refreshing the entire page.
    After verifying that the report is set to allow partial refreshes, I took the following steps
    1.  Created a PO Line select item (p_po_line_select) in the same report region
    2.  Added p_po_line_select to the report query
    3.  Created a dynamic action on p_po_line_select with 2 true actions
         1.  Set value (p_po_line_select)
         2.  Refresh report region.
    The Set Value dynamic step was not working; I would get an out of memory error at line 2, memory stack error, or the value did not get saved to session state depending on the settings I selected.  I was able to get it working with the following set:
    1.  Action = Set Value
    2.  Set type = PL/SQL Expression
    3.  PL/SQL Expression = :p_field_does_not_exist
    4.   Page items to submit = blank
    5.  Selection Type = Item(s)
    6.  Item(s) = p_field_does_not_exist
    p_field_does_not_exist does not exist as a page or application item which leads me to believe that this is a bug and I am just lucky that it worked.  I would rather know how to do this properly.  Can someone please provide a link to a working example of how this should be done or state which settings are wrong?
    I was able to reproduce the issue in the following app
    http://apex.oracle.com/pls/apex/f?p=4500:1000
    workspace = occam
    user  test/apex1
    Thanks,

    STOP POSTING DUPLICATE THREADS.
    If you have additional information, continue the discussion by posting it as a follow-up on the original thread: What is the proper way to filter classic report using just an LOV select field with dynamic action?

  • Bug (possibly?): SelectManyShuttle fails to display selected items

    Bug (possibly?): SelectManyShuttle fails to display selected items when valuePassThru="true" in ADF 10g
    Hello all,
    When run, the example below shows a Select Many Shuttle with four choices in the leading list. When items are shuttled to the training list and the page is submitted the trailing list is rendered with no items selected. Is this a bug?
    Configuration
    This example was constructed using jDeveloper 10.1.3.5.0.
    A new application was created using the Web Application [JSF, ADF BC] template although no business components are used.
    Steps to Reproduce
    1. Create the following backing bean class.
    package com.fmcna.adf.test.view;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    public class ShuttleBean {
        public ShuttleBean() {
        private List availableItems;
        private List selectedItems;
        public void setAvailableItems(List availableItems) {
            this.availableItems = availableItems;
        public List getAvailableItems() {
            //populate with a List of SelectItem instances on the inital call to this method
            if(this.availableItems==null) {
                this.availableItems=generateSelectItemsList();
            return availableItems;
        public void setSelectedItems(List selectedItems) {
            this.selectedItems = selectedItems;
        public List getSelectedItems() {
            return selectedItems;
         * Build a List of SelectItem instances to be used by an af:selectManyShuttle
         * @return A List containing SelectItems instances
        private List generateSelectItemsList() {
            List initialItems = new ArrayList();
            initialItems.add(new SelectItem(new Integer(11),"First Choice"));
            initialItems.add(new SelectItem(new Integer(22),"Second Choice"));
            initialItems.add(new SelectItem(new Integer(33),"Third Choice"));
            initialItems.add(new SelectItem(new Integer(44),"Fourth Choice"));
            return initialItems;
    }2. Configure the ShuttleBean class as a session scoped managed bean as in the following faces-config.xml file.
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
      <managed-bean>
        <managed-bean-name>ShuttleBean</managed-bean-name>
        <managed-bean-class>com.fmcna.adf.test.view.ShuttleBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      <application>
        <default-render-kit-id>oracle.adf.core</default-render-kit-id>
      </application>
    </faces-config>3. Create a JSP page containing an af:selectManyShuttle with a nested f:selectItems component. Wire the values for these components to the properties in the managed bean.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <f:view>
      <html>
        <head>
          <meta http-equiv="Content-Type"
                content="text/html; charset=windows-1252"/>
          <title>testShuttle</title>
        </head>
        <body><h:form>
            <af:selectManyShuttle value="#{ShuttleBean.selectedItems}" valuePassThru="true">
                <f:selectItems value="#{ShuttleBean.availableItems}"/>
            </af:selectManyShuttle>
            <af:commandLink text="Postback"/>
        </h:form></body>
      </html>
    </f:view>4. Run the JSP. Validate that the trailing list is initially empty.
    5. Shuttle one or more items to the trailing list and click the Postback button. Validate that when the page refreshes the trailing list is again empty.
    Thanks for any input you might be able to provide.
    Chris Mihalcik
    Edited by: user5384858 on Jun 14, 2010 1:06 PM

    I'm holding my Nano in my hot little hands with ALL of the things you listed, but here's the sad, simple truth: you CAN'T use iTunes to sync everything. It works well for:
    1) Music
    2) Videos (except sometimes in Vista)
    3) Photos (as long as they're not too large)
    but is terrible for:
    1) calendar
    2) contacts
    3) To-Do lists
    For the latter use something like "iGadget" (www.ipodsoft.com). I also edit/store notes w/iGadget plus it allows you to export files, etc.
    I gave up on syncing iTunes w/Outlook long ago. Good luck.

  • How can I return to the last selected item in a dialog box

    In OS 9 using Dreamweaver (for example) when I was adding images to a document, each time I added one the dialog box would return to the last selected image and I could just arrow down to the next in the list, add it (exiting the dialog box) and then repeat the process until I had added all the images in the folder. Now, using OS 10.4, after I add an image, and return to the add image dialog box it goes to the first item in the folder list instead of the last selected item. this really slows the process down, and when I'm adding 100 items or so, it's a real drag. I figure there has to be a way to get the dialog box to return to the last selected item, but I don't know what it is. Help!

    sorry, that is not what I want to do.
    I want to return to the initial state before I quit the app.
    Actually, I want to return to the intial state after I click a row in a table the second time.
    Sorry, I didn't say clearly.

  • How to get selected items from a tree in backing bean without adfbc

    Hi ADF Experts,
    Below is my code for af:tree. My question is how can I get selected Items from the selectionListener (without adf bc) this uses formation of tree from backing bean.
    Using Jdev 11.1.1.7.0
    <af:tree var="node" value="#{pageFlowScope.MerchandizeBean.model}"
                      binding="#{pageFlowScope.MerchandizeBean.treeModel}"     id="tree" immediate="true" autoHeightRows="0"
                           styleClass="AFStretchWidth" rowSelection="multiple"
                           selectionListener="#{pageFlowScope.MerchandizeBean.treeNodeSelection}">
                    <f:facet name="nodeStamp">
                      <af:commandLink text="#{node.classDescription}"
                           actionListener="#{pageFlowScope.MerchandizeBean.createListManyItemForMerchandise}"           id="displayTable" partialSubmit="true">
                      </af:commandLink>
                    </f:facet>
                  </af:tree>
        public void treeNodeSelection(SelectionEvent selectionEvent) {
            // Add event code here...
            RichTree tree = (RichTree)selectionEvent.getSource();
                    TreeModel model = (TreeModel)tree.getValue();
                    //get selected value
    Thanks
    Roy

    Hi,
    in a multi select case, try
    RowKeySet rks = tree.getSelectedRowKeys();
    Iterator iter = rks.iterator();
    while(iterator.hasNext()){
    Object aKey = iterator.next();
    tree. setRowKey(aKey);
    Object rowData ? tree.getRowData();
      .... do something with the data here ...
    Frank

Maybe you are looking for

  • Open interactive form error

    Hello A question, i got a PDF interactive form open up when I fire plug on to the next view, but if I click Open the pdf wont open, and if I go Save it will open, what should I do to make it open on the Open option, and Maybe you may tell me How to m

  • ITunes 7.1 has changed how my music files are organised - why?

    My preference is to store all the music on my PC underneath iTunes, thus: My Documents\My Music\iTunes\iTunes Music\{artist}\{album} I do not purchase music from the iTunes store (there hasn't been one in my country until very recently) but I do impo

  • Unable to send or recieve mail pop up continually says wrong user I'd or password.

    UNable to send or recieve mail pop box continually says wrong user I'd or password both chiecked ok.

  • Webutil   and jacob software

    while trying to run the jacob.jar we are running into into the following error 'Failed to load mail-class manifest attribute from c:\webutil\lib\jacob.jar' How can this error be trouble shooted, what should we check and verify?

  • IWeb and non-iWeb files @ same site?

    I have modified my CNAME at my personal domain site to forward to MobileMe, and I am not having any problems with that aspect. What I am wondering is ... can I have both iWeb files and non-iWeb files at the same site and still use MobileMe? Basically