ComboBox hell

I am trying to write code that will check whether the date entered by the user is valid. The following code works but only with the first month chosen e.g. if the user selects 31 Feburary the correct Dialog box will be displayed. I would like it so that if the user selects another month and an invalid date e.g. 30 April the correct dioalg box will appear to warn the user. The problem is that the month doesn't change it always stays on the month, in the above example Feburary. I have tried to create a new String but it doesn't seem to change any thing. Here are the relevent snipets of the code
private Integer selectedDay;
String selectedMonth;
//Report start day combo box settings
startDay = new JComboBox(days);
startDay.setPreferredSize(new Dimension(55, 30));
startDay.setFont(comboText);
panel.add(startDay);
layout.putConstraint(SpringLayout.WEST, startDay,200, SpringLayout.WEST, panel);
layout.putConstraint(SpringLayout.NORTH, startDay, 95, SpringLayout.NORTH, panel);
startDay.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
startDayActionEvent(evt);
//Report start month combo box setttings
startMonth = new JComboBox(months);
startMonth.setPreferredSize(new Dimension(100, 30));
startMonth.setFont(comboText);
panel.add(startMonth);
layout.putConstraint(SpringLayout.WEST,startMonth,255, SpringLayout.WEST, panel);
layout.putConstraint(SpringLayout.NORTH, startMonth,95, SpringLayout.NORTH, panel);
startMonth.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
startMonthActionEvent(evt);
private String startDayActionEvent(ActionEvent evt){
selectedDay = new Integer(dayn);
JComboBox cb = (JComboBox)evt.getSource();
selectedDay = (Integer)cb.getSelectedItem();
if(selectedMonth != null){
checkDays.check(selectedDay, selectedMonth, cb);
else if (selectedMonth == null);
return null;
private void startMonthActionEvent(ActionEvent evt){
JComboBox cb = (JComboBox)evt.getSource();
selectedMonth = (String) cb.getSelectedItem();
selectedMonth = checkDays.check(selectedDay, selectedMonth, cb);
selectedMonth = new String(selectedMonth);
//check mehtod in class Days
public String check(Integer days, String month, JComboBox cb){int theDay = days.intValue();
         if((theDay > 28) && (month.equals("Feburary"))){
               JOptionPane.showMessageDialog(null, "Invalid date.\nThere are only 28 days in Feburary");
               cb.setSelectedIndex(27);
               return null;
     else if((theDay > 30 ) && (month.equals("April"))){
     JOptionPane.showMessageDialog(null, "Invalid date.\nThere are only 30 days in April");
     cb.setSelectedIndex(29);
     return null;
     else if((theDay > 30 ) && (month.equals("June"))){
     JOptionPane.showMessageDialog(null, "Invalid date.\nThere are only 30 days in June");
     cb.setSelectedIndex(29);
     return null;
     else if((theDay > 30 ) && (month.equals("September"))){
     JOptionPane.showMessageDialog(null, "Invalid date.\nThere are only 30 days in September");
     cb.setSelectedIndex(29);
     return null;
     else if((theDay > 30 ) && (month.equals("November"))){
     JOptionPane.showMessageDialog(null, "Invalid date.\nThere are only 30 days in November");
     cb.setSelectedIndex(29);
     return null;
     else;
     return null;
     }

I took a break, came back and realised my mistake. Thanks anyway.

Similar Messages

  • Adding a Row to Table, ComboBox as a  TableCellRenderer Problem !!

    Hell All:
    I have a JTable with one of the Cell as ComboBox. Initially I draw the JTable with Three Rows and the
    the ComboBox in the Second Column works fine. I see each comboBox has different Items. The ComboBox also has a Renderer (as I am customizing the Item's Text )
    Here is the snippet from my Code.
    ==========================
    // UIEditSubAllocation.ALT_ACCOUNT = 2;
    // Get the Viewindex.... to get the correct column
    int viewIndex = this.m_suballocTable.convertColumnIndexToView(UIEditSubAllocation.ALT_ACCOUNT);
    // get the Table Column...
    TableColumn altActColumn = this.m_suballocTable.getColumnModel().getColumn(UIEditSubAllocation.ALT_ACCOUNT);
    // Create Three ComboBox..
    JComboBox[] altActCell = new JComboBox[3];
    for (int i =0;i< 3;++i) // adding Three Rows of Table Data...
    String [] alternateAccounts = new String[4];
    for(int j = 0; j < alternateAccounts.length; j++) // Each Alternate Accounts i.e combobox has 4 items..
    alternateAccounts[0] = "Tom";
    alternateAccounts[0] = "Vic";
    alternateAccounts[0] = "Tracy";
    alternateAccounts[0] = "Andy";
    altActCell[i] = new AltAccountComboBox(alternateAccounts,this.m_suballocTable);
    } // End of adding Three Rows
    altActColumn.setCellRenderer(new AltAccountTableCellRenderer());
    if (viewIndex >= 0)
    ComboBoxEditor altActCellEditor = new ComboBoxEditor(altActCell);
    altActColumn.setCellEditor(altActCellEditor);
    The CombBoxEditor code is...
    ublic class ComboBoxEditor extends DefaultCellEditor
    * Constructs a ComboBoxEditor that uses an array of items of type object.
    * @param items - an array of items of type object
    public JComboBox[] m_comboBox;
    public ComboBoxEditor(JComboBox[] box)
    super(box[0]);
    m_comboBox = box;
    for(int i = 0; i < box.length; i++)
    m_comboBox.setEditable(false);
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
    if(row >= this.m_comboBox.length)
    return super.getTableCellEditorComponent(table, value, isSelected, row, column);
    return m_comboBox[row];
    But when I click a Button (in a Panel) which adds a Row (with No values for the ComboBox ).. to the Jtable .. The Row Gets added fine.. but the JComboBox comes with Values from the First Row's ComboBox. I Don't want any Values in the JComboBox for the new added Row. Can someone tell me
    how do I remove the Items from the ComboBox.
    I will really appreciate for any help...
    Thanks
    -Pankaj

    Hi ,
    as per my opinion one approach would be that ,
    you create a custom table region same as standard one using Jdeveloper and create other required fields also using jeveloper ,and then put this region in extend property of existing standard table region .
    thanks
    Pratap

  • Use ComboBox TableCellEditor  - values are not saved to the table model

    Hi,
    I got a combobox cell editor that uses to edit one of the columns.
    And i got an ok button that uses to collect the data from the table and save it to the db.
    In case i started editing of a cell and the editor is still displayed- if i will click on the button the data that will be colected from the table model will not contained the updated value in the cell editor.
    In this case the user think his changes were saved but the last updated field is not updated.
    Is this a bug i got in the cell editor or this is the normal behaviour?
    Can it be fixed? (So that if the cell is in the middle of editing the value that will be saved is the last value that was selected).
    public class PriorityCellEditor extends StandardComboBox implements TableCellEditor {
        private boolean isEditMode=false;
         * A list of eventlisteners to call when an event is fired
        private EventListenerList listenerList = new EventListenerList();
         * the table model
        public StbAreaClusterPriorityCellEditor(boolean isEditMode) {
            super(StbAreaMapper.clustersPriorities);
            setEditMode(isEditMode);
            setEditable(false);
            this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
            setAlignmentX(Component.LEFT_ALIGNMENT);
        public boolean isEditMode() {
            return isEditMode;
        public void setEditMode(boolean editMode) {
            isEditMode = editMode;
            setEnabled(editMode);
        public Component getTableCellEditorComponent(JTable table, Object value,boolean isSelecte, int row, int column) {
            int selectedIndex;
            if (isSelecte) {
                setForeground(table.getSelectionForeground());
                setBackground(table.getSelectionBackground());
            } else {
                setForeground(table.getForeground());
                setBackground(table.getBackground());
            if(value instanceof String){
                selectedIndex=StbAreaMapper.mapGuiPriorityDescToGuiCode((String)value);
                setSelectedIndex(selectedIndex);
            return this;
        public void cancelCellEditing() {
            fireEditingCanceled();
        public Object getCellEditorValue() {
            return getSelectedItem();
        public boolean isCellEditable(EventObject anEvent) {
            return isEditMode;
        public boolean shouldSelectCell(EventObject anEvent) {
            return false;
        public boolean stopCellEditing() {
            fireEditingStopped();
            return true;
         * Adds a new cellEditorListener to this cellEditor
        public void addCellEditorListener(CellEditorListener l) {
            listenerList.add(CellEditorListener.class, l);
         * Removes a cellEditorListener from this cellEditor
        public void removeCellEditorListener(CellEditorListener l) {
            listenerList.remove(CellEditorListener.class, l);
         * Notify all listeners that have registered interest for notification on
         * this event type.
         * @see javax.swing.event.EventListenerList
        protected void fireEditingStopped() {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            // Process the listeners last to first, notifying
            // those that are interested in this event
            for (int i = listeners.length - 2; i >= 0; i -= 2) {
                if (listeners[i] == CellEditorListener.class) {
                    ((CellEditorListener) listeners[i + 1]).editingStopped(
                            new ChangeEvent(this));
         * Notify all listeners that have registered interest for notification on
         * this event type.
         * @see javax.swing.event.EventListenerList
        protected void fireEditingCanceled() {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            // Process the listeners last to first, notifying those that are interested in this event
            for (int i = listeners.length - 2; i >= 0; i -= 2) {
                if (listeners[i] == CellEditorListener.class) {
                    ((CellEditorListener) listeners[i + 1]).editingCanceled(new ChangeEvent(this));
    }

    Try this
    yourTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

  • Getting data in a combobox from database

    I have done database connectivity in flex using .net. Now I am getting data in flex in a data grid. Everuthing is working fine if I take data in a data grid.
    My problem is that if I try to take that data in any other control, other than data grid, it shows up no data, it only shows "object[object].
    for ex:
    if I am getting 3 rows from databse and I try to get those in a combo box, den I am getting 3 items in combo box like this:
    object[object]
    object[object]
    object[object]
    instead of actual data.
    I am stuck in this problem for last 3 days. I have tried lot of things but nuthing is working. Plz anyone help me out soon. Its really urgent.
    I am working on a live project and not able to proceed because of this problem.

    Hi Bhavika,
    You need to tell your combobox which value should be displayed in the ComboBox...for display...
    You are getting 3 rows from database which are objects since you haven't told your combobox which value to be displayed it is displaying as [Object,Object]...
    So you need to tell your ComboBox which values to be displayed ..and you can do this by assigning the labelField property of the ComboBox..
    Say in your object you have three properties say..data, value, name...etc;;
    Then if you want display name as your ComboBox display label then simply write ....labelField="name" in your ComboBox ...
    Thanks,
    Bhasker Chari

  • Problem setting Index value on ComboBox

    I am running into a problem with setting the index on a
    dropdown box. I will try to give as much detail as possible. From
    what I can tell, it should be working and does, but only for one
    item. If anyone can suggest a different group to post to, let me
    know. I can not find a solution anywhere.
    I have the following code to show a combobox. The data is
    derived from a XML config file. The combobox itself works fine and
    does in fact show all of the data from the XML config file.
    <mx:HBox>
    <mx:Label text="Status" width="55"/>
    <mx:ComboBox id="uxstatus" dataProvider="{_xmlVulnStatus}"
    labelField="status"/>
    </mx:HBox>
    The part of the XML config file that is used to populate the
    combobox.
    <mainconfig>
    <vulnstatus>
    <status>Open</status>
    <status>In Progress</status>
    <status>Closed</status>
    </vulnstatus>
    </mainconfig>
    Now, when a user selects an item from a separate datagrid, on
    change I have it run the following function. The function reads in
    the data, parses it and compares the "status" value from the
    datagrid info with the "status" options in the XML config file.
    When it matches, it sets the index number for the combobox so it
    shows the right data. My problem is below the function.
    public function parseMSVulnStatus(evt:Event):void {
    var xmlMSV:XML = XML(msdetailed.selectedItem); //the host
    dataProvider item
    //trace ("MS Vuln status = "+xmlMSV.status);
    for ( var MSVi:Number=0; MSVi<_xmlVulnStatus.length();
    MSVi++ ) { //loop over the items in the dataProvider
    var sDataValueCurMSV:String =
    _xmlVulnStatus[MSVi].valueOf(); //get the current item.data value
    if ( sDataValueCurMSV == xmlMSV.status ) { //compare desired
    value to current item.data value
    mx.controls.Alert.show("match found - MS Vuln status =
    "+xmlMSV.status +" and MSVi = " +MSVi);
    msstatus.selectedIndex = MSVi; //set the seletedIndex of the
    combo box
    else {msstatus.selectedIndex = -1}
    if (msdetailed.selectedItem.falsepos=='Y')
    {msfalsepos.selected=true;}
    The problem. If the value from the datagrid is "Closed", it
    shows the index as being "2" and sets the combobox index
    appropriately and displays "Closed". The alert box is displayed
    (for testing) to show the values.
    If the value from the datagrid is either "Open" or "In
    Progress", it does show the proper index as being either 0 or 1,
    respectively and shows the alert box. However, the combobox appears
    to be set to -1. I have verified the data is set properly in the
    database (which is what populates the datagrid).
    Any thoughts on this? Based on my alert box, it appears that
    the data is seen properly and that it knows how to set the index of
    the combobox.... it's just not happening (unless it's "Closed").
    Thanks in advance.
    Chris

    you could force a selected index using something like
    mydatagrid.selectedIndex=0 or 1 try this pos i made for someone
    beacause if you want to cange the value of field based on selection
    this could be simpler by using an xml file with all the value for
    each record in one object
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585&threadid=1273227&CF ID=48614795&CFTOKEN=89f80916a77a7788-F5418AD3-F360-8283-2DCCA603D0E18DCF&jsessionid=48307b ef3fdf5663544a

  • IPhone 5S pre-order HELL!!

    Verizon iPhone 5S PRE-ORDER HELL!! - They screwed up and dragged my situation out for 9 days!!  At the end of it all I'm still missing an iPhone 5S.  9/20 @ midnight I ordered TWO iPhone 5S 16GB silver and received a order confirmation for BOTH phones and a confirmed ship by date of 9/24.  NO notification of anything went wrong.  9/22 - I get a shipping notification from Verizon but only one mobile # is listed.  I call Customer Care and rep just quickly and casually confirms that two phones shipped.  9/23 - I get an email saying they couldn't fulfill my order completely and that the remaining order will ship 9/30.  I call Customer Care again to inquire about this and he the rep went out of his way (great guy) to confirm that two phones have shipped and that I have nothing to worry about.  Said the message was generic and was mistakenly sent out.  9/25 - I receive package and find only ONE iphone!!  I called Customer Care again and this time Adam helped me.  After looking through things, he comes back saying he thinks the iPhone was taken out of the box before shipment, stolen!!!  Had me send him all this information and said the Verizon investigation team is on it to "look" for the iphone. I asked if he could put a new order in and just exchange it for the "misplaced" iPhone.  He said it was not necessary because he believes there is a iphone somewhere.  9/27- Adam leaves me a voice mail saying that it was all a misunderstanding and my iphone should ship 9/30 and he'll be on it.  9/29 - I help my wife activate her iPhone because she tried until 3am the night before with no help.  While I'm on with Customer Care again she, Ida, asks how's my phone service in which I explain to her everything.   She looks into it and says she sees no record of any order or tracking for an iPhone.  Further says the reason one iPhone was placed on hold because a discount was applied to two devices and it could only be used for one.  I told her that I've never been notified by Verizon that something went wrong until today.  And this is after calling Customer Care numerous times.  And NOW I find this out.  She says she's going to look into it as there might be a small chance that there is an iPhone for me.  She said she'll call back by 5pm and txted me her email address.   6:00pm comes and no callback.  It also turns out the email address is bogus.  I call Customer Care again and get another rep who looks into it and does a whole bunch more investigation.  Finally she says there never was an order for my iphone and there will be no iphone shipping tomorrow.  My only choice is to place a new order and I won't get it until 10/14!!!  SERIOUSLY!!! ARGGGGGHHHHHHGGHGHHGG!!! Expletives galore!!!  Talked to the manager Brandon and asked if they can do something for me to compensate me for all this crap I went through.  I've been with Verizon for like 15 years.  He kept on saying "I understand ..blah..blah.. BUT there's nothing we can do" over and over again.  So I said Verizon made a mistake, detected this mistake but didn't notify the customer of this mistake, Customer Care couldn't figure it out until today, and that I'm out of luck?  Does he REALLY understand?  If I had known all this I could have walked to a store on 9/20 and gotten a iphone.  Pre-ordering was suppose to be a convenience provided, right? And I waited because I was led to believe that some iPhone existed..  dragged along for a ride only to find out there was no iphone.   And after all this, I get nothing but "I understand....  But there's nothing we can do..."  So yes people Verizon stinks!!! They do not hold themselves accountable for their mistakes and expects the customer to just take it.   I'll have to admit that not all customer service reps are bad (Ty, Adam, and the very last girl who helped me you guys were awesome!!  Ida you could have made this list until you decided not to call me back and gave me a bogus email).  Customer Care is a mixed bag and have not real authority to help you.  Verizon is about to lose yet another loyal customer and his family soon.  There should be some class action lawsuit for all the iphone 5s issues.  Promises/Contracts made but Verizon completely failed to keep.  They just jerk us along for a ride, dangling that ship date that keeps moving around.
    >> Edited to comply with the Verizon Wireless Terms of Service <<
    Message was edited by: Verizon Moderator

    "Customer Care is a mixed bag and have not real authority to help you." I worked for Verizon before it was Verizon, for several years. I think that you are entirely correct in your assessment of customer care. Reps really can't do much at all. I believe that the key function of reps is 1. hand holding and 2. punching bag. The goal is to get the customer believe that they actually DID something, and got some result! After all the talking, the customer starts to believe that something actually happened to resolved the situation. At least they spoke to SOMEONE! Picture this: the rep is on the computer, wearing a headset, and the calls are coming at them non-stop, and you have 3 minutes to convince this person that you actually helped them! But in the end, as you said, nothing happened!  It is the sad truth of cs.
    I am curious to see if the Moderator leaves this post on the board.

  • Trying to write a Listener on a CheckBox to change the Model of a ComboBox

    I am trying to change the list that appears in a ComboBox dynamically based on if a CheckBox is selected or not. I have multiple CheckBoxes and ComboBoxes being created in a loop based on a variable assigned at creation. Every tutorial i have seen writes out a listener that explicitly defines the checkbox instance but in my case i don't acctually know. My checkboxes are in an array of checkboxes as are the comboboxes as they are being created at runtime. Any help would be much apreciated this issue has been with me for two days now.

    here is a snippit of my code in how i was implementing this:
    int numButton = 17; //this is for testing only, this variable is set from another class normally
    // these variables are defined private elsewhere in the class
    JCheckBox PlayerByeCheck[] = new JCheckBox[numButton + 1];
    JCheckBox PlayerHomeCheck[] = new JCheckBox[numButton + 1];
    boolean PlayerOnBye[] = new boolean[numButton + 1];
    for (int i = 1; i <= numButton; i++) {
             PlayerByeCheck[i] = new JCheckBox();
         PlayerHomeCheck[i] = new JCheckBox();
         PlayerOnBye[i] = false;
    // more code here for building the gui it is not important for this problem
    // code to build the list starts here
    for (int i = 1; i <= numButton; i++) {
         ((TableLayout)PlayerRosterPanel.getLayout()).insertRow(1, TableLayout.PREFERRED);
             PlayerByeCheck.setOpaque(false);
         PlayerByeCheck[i].addItemListener(this);
         PlayerByeCheck[i].setName("PlayerByeCheck" + i);
         PlayerRosterPanel.add(PlayerByeCheck[i], new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));
    //the comboox that i want to change
    //---- PlayerTeamSelect1 ----
         if (PlayerOnBye[i] = true) {
              PlayerTeamSelect[i].setModel(new DefaultComboBoxModel(new String[] {
                   "ARI",
                   "ATL",
                   "BAL",
              "BUF",
         "BYE"
              PlayerTeamSelect[i].setSelectedItem("BYE");
         } else {
              PlayerTeamSelect[i].setModel(new DefaultComboBoxModel(new String[] {
                   "ARI",
                   "ATL",
                   "BAL",
                   "BUF",
                   "CAR",
              "BYE"
         PlayerTeamSelect[i].setOpaque(false);
         PlayerRosterPanel.add(PlayerTeamSelect[i], new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
    //more gui code here method gets closed
    //Item Action Listener starts here this is where i am having the problem                         
    public void itemStateChanged(ItemEvent e) {
         Object source = e.getItem();
         if (source == PlayerByeCheck[1])
         int select = e.getStateChange();
              if (select == ItemEvent.SELECTED)
              PlayerOnBye[1] = true;
    PlayerRosterPanel.repaint();
    //repaint the window i think can't get the listener to work to see if this is the right way to do this
    //i doubt it is
    I have tried several different ways to write the listener, the example in the code above is following the java swing tutorial by explicitly defining the checkbox. I have tried to write the listener as i am creating the checkbox, which doesn't seem to work or i am wrting it wrong, which is entirely possible. Once the listener sets the value i think it should repaint the screen but i am sure that that is wrong right now as well. As my hunch is the repaint will reset the checkbox to DESELCTED the default value. I will come to that issue once i figure out how to get the listener working. Ideally i want to be able to set the listener for the checkboxes regardless as to how many there are. As stated above i am generating a list of checkboxes, comboboxes and other fields based on a variable that is defined in one of my objects. If the user selects checkbox 3 than combobox 3 should be changed, and the others should not. if the user selects all the checkboxes than all the comboboxes change.
    thanks for any help. Still plugging along on it trying to figure this one out.

  • 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

  • ComboBox - Setting Selected Values from data

    I am running into a problem in Flex 3 that seems to be
    different from Flex 2. Maybe someone can help.
    I have a function for setting a combobox selected item for a
    location for a value when the titlewindow completes loading. The
    value is a prior value from a prior save. In other words to set the
    combobox a value from a prior session.
    The locations xml file is loaded from a remote object
    oncreationcomplete of the titlewindow. The setselectedvalue
    function worked perfectly in Flex 2 but now only works in Flex 2
    after the titlewindow is loaded. We tested this by running the
    setselectedvalue function from a button click after loading.
    The dataprovider length is showing 0 in our debugging. After
    titlewindow up on screen the length is showing correct ( 35 ) - in
    this case. Our viewxmlobject function is showing no xml. Shows xml
    correctly after up on screen.
    I have set the creationpolicy to "all". That did not help
    either.
    Any suggestions? Anyone. This is killing me. Spent two days
    now trying to get back to working state.
    private function SetSelectedValue_cbLocation(): void {
    var xLocID:String = eLocationID.text;
    //viewXmlObject( cbLocation.dataProvider )
    for (var i : int = 0; i < cbLocation.dataProvider.length
    ; i++) {
    //Alert.show( cbLocation.dataProvider
    .locid, 'Location DataProvider', Alert.OK);
    if ( xLocID == cbLocation.dataProvider.locid ){
    cbLocation.selectedIndex = i;
    break;
    The combobox has the dataprovider set at design time.
    <components:is2ComboBox id="cbLocation" x="585" y="4"
    width="196" dataProvider="{xmlLocations.Record}"
    labelField="locname" dataField="locid"
    change="changeLocation(event)" disabledColor="#004080" prompt="1.
    Please select location"></components:is2ComboBox>

    Hard to say without seeing the code. Is the application
    opening a pop-up window (the title window)? If so, where is the
    combo box located? In the main app or the titleWindow? What calls
    the SetSelectedValue_cbLocation() function?

  • Getting Combobox values from a mySQL database

    Hello,
    I have a combobox like this:
    <mx:FormItem label="Avancement:" id="avancement_form">
    <mx:ComboBox id="avancementCol">
    <mx:dataProvider>
    <mx:Array>
    <mx:Object label="Livraison ce jour" />
    <mx:Object label="Livraison cette semaine"/>
    <mx:Object label="Attente éléments"/>
    <mx:Object label="A planifier"/>
    </mx:Array>
    </mx:dataProvider>
    </mx:ComboBox>
    </mx:FormItem>
    But I want getting values from MYsql, have you a suggestion
    please?
    Thank you

    call a php function to retrieve the values. i prefer to call
    the php using amfphp but you can use httpservice.

  • How to get the values of 2 dynamic comboboxes in one jsp to another jsp?

    I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
    Select.jsp:
    <%@ page language="java" import="java.sql.*" %>
    <%!
         Connection con = null;
         Statement  st  = null;
         ResultSet  rs  = null;
         String     sql = null;
         void addItems(javax.servlet.jsp.JspWriter out, String sql)
           try{     
              rs = st.executeQuery(sql);
              while( rs.next() )
                   out.println("<option>" + rs.getString(1) + "</option>");               
         }catch(Exception e)
                   System.out.println(e);
    %>
    <HTML>
    <HEAD>
    <TITLE>JSP WITH  MULTIPLE FORMS</TITLE>
    <script language="javascript">
              function checking()
                        form1.submit();
         </script>
    </HEAD>
         <body>
             <center>
             <b><font size="5" color="#333399">Staff ID:</font></b></center>
                     <FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
                         <p align=center>
                         Details of Staff :  
                       <SELECT 1 NAME="type" onchange="checking();">
                                    <option> Administrator </option>
                              <option> OfficeAssistent </option>
                              <option> Clerk </option>
                                  </SELECT 1>
                          </p>
    </FORM>
                      <FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
                      <center>
                          <TABLE><TR><TD>Staff ID:</TD>
                                 <TD><SELECT 2 NAME="staff_id">
                    <%    
            String type = request.getParameter("type");
            try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
            catch (ClassNotFoundException ex) {
                   System.out.println(ex);
            catch (SQLException ex)
                System.out.println(ex);
         st  = con.createStatement();
         sql = "select staff_id from "+type+"";
         addItems(out, sql);
    %>
              </SELECT 2>
           </TD>
         </TR>
    </table></center>
    <h2> Details of <%= type + "s" %> </h2>
                         <center><input type=submit value=ok onclick="submit();"></center>
                  </FORM>
         </BODY>
    </HTML>
    welcome1.jsp
    <center><h1>WEL COME</h1></center>
    <%    
            String type = request.getParameter("type");
            String sid = request.getParameter("staff_id");
    %>
    <h2> Details of <%= type + "s" %> </h2>
    <h2> Details of <%= sid %> </h2>

    <SELECT 1 NAME="type" onchange="checking();">
                                    <option value = "0"> Administrator </option>
                              <option value = "1"> OfficeAssistent </option>
                              <option value = "2"> Clerk </option>
                                  </SELECT 1>

  • How to get the selectedIndex from a combobox made by classFactory?

    Dear All,
    I am trying to get the selectedIndex or selecetedItem.banda_id when changing a combobox that is created by classFactory and it is inside a datagrid.
    The code I have is:
    MXML:
    <mx:DataGrid width="100%" height="100%" id="salas_fin_dg" editable="true">
         <mx:columns>
    <mx:DataGridColumn headerText="Titulo" dataField="titulo" editable="false" width="250"/>
    <mx:DataGridColumn headerText="Data" dataField="start_dt" editable="false"/>
    <mx:DataGridColumn headerText="Dur" dataField="duration" editable="false" width="40"/>
    <mx:DataGridColumn headerText="Banda" dataField="banda_nome" editable="true" itemEditor="{combofac}"/>
    <mx:DataGridColumn headerText="$ Ensaio" dataField="total_ensaio" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ Bar" dataField="total_bar" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ Loja" dataField="total_loja" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ CC" dataField="total_cc" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ CH" dataField="total_ch" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ DI" dataField="total_di" editable="true" itemEditor="controls.NumericInput"/>
    <mx:DataGridColumn headerText="$ Pend" dataField="total_pend" editable="true" itemEditor="controls.NumericInput"/>
         </mx:columns>
    </mx:DataGrid>
    Script:
    private function getSalasFinHandler(event:ResultEvent):void
    salas_fin_lst = new ArrayCollection(event.result as Array);
    salas_fin_dg.dataProvider = salas_fin_lst;
    myservice.getBandas();
    combofac=new ClassFactory(ComboBox);
         combofac.properties={dataProvider:bandas_lst, labelField:"banda_nome", prompt:"Selecione"};
    I am using Remote Object to get the data from a DB, and it is working properly.
    As I will update the datagrid cell values, I would like to update them on the DB.
    In order to do that, I would need to access the banda_id value, that is part of the combofac dataprovider, I mean that this dataprovider has 2 columns, being banda_nome and banda_id.
    The question is how to get the banda_id value, when I change the comobobox?
    Many thanks in advance,
    Gines

    Dear harUI and kolinitcom,
    Thanks for the your prompt response and guidelines.
    I went to research a little bit more on the itemEditEnd and found a way to access the data inside the combobox.
    The code for all application goes below. If you click on the button, it will show you all the datagrid data, plus the ID of the combobox when changed.
    Thanks again,
    Gines
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
            layout="vertical"
            verticalAlign="middle"
            backgroundColor="white" initialize="init();">
            <mx:Script>
               <![CDATA[
               import mx.utils.ObjectUtil;
               import mx.controls.ComboBox;
               import mx.controls.Alert;
               import mx.events.DataGridEvent;
               import mx.events.*;
          [Bindable]
          private var combofac:ClassFactory;
      public var newVal:String;
          private function init():void
            combofac=new ClassFactory(mx.controls.ComboBox);
            combofac.properties={dataProvider:arrcombo, prompt:"Selecione", labelField:"label"};      
                public function getCellInfo(event:DataGridEvent):void {
                    var myEditor:ComboBox = ComboBox(event.currentTarget.itemEditorInstance);
                    newVal = myEditor.selectedItem.data;
    public function mostra():void
    var dados:Object = new Object;
    dados.nome = dataGrid.selectedItem.label;
    dados.score = dataGrid.selectedItem.score;
    dados.score_id = newVal;
    Alert.show(ObjectUtil.toString(dados));
           ]]>
        </mx:Script>
        <mx:TextArea id="cellInfo" width="300" height="150" />
                <mx:ArrayCollection id="arrcombo">
            <mx:source>
                <mx:Array>
                    <mx:Object label="1" data="A1"/>
                    <mx:Object label="2" data="A2"/>
                    <mx:Object label="3" data="A3"/>
                    <mx:Object label="4" data="A4"/>
                    <mx:Object label="5" data="A5"/>
                    <mx:Object label="6" data="A6"/>
                    <mx:Object label="7" data="A7"/>
                    <mx:Object label="8" data="A8"/>
                    <mx:Object label="9" data="A9"/>
                </mx:Array>
            </mx:source>
        </mx:ArrayCollection>
        <mx:ArrayCollection id="arrColl">
            <mx:source>
                <mx:Array>
                    <mx:Object label="Student A" score="8" />
                    <mx:Object label="Student B" score="4" />
                    <mx:Object label="Student C" score="7" />
                    <mx:Object label="Student D" score="8" />
                    <mx:Object label="Student E" score="2" />
                    <mx:Object label="Student F" score="6" />
                    <mx:Object label="Student G" score="7" />
                    <mx:Object label="Student H" score="7" />
                    <mx:Object label="Student I" score="9" />
                    <mx:Object label="Student J" score="8" />
                    <mx:Object label="Student K" score="4" />
                    <mx:Object label="Student L" score="7" />
                </mx:Array>
            </mx:source>
        </mx:ArrayCollection>
        <mx:DataGrid id="dataGrid"
                dataProvider="{arrColl}"
                editable="true"
                rowCount="8"
                itemEditEnd="getCellInfo(event);">
            <mx:columns>
                <mx:DataGridColumn dataField="label"
                        editable="false" />
                <mx:DataGridColumn dataField="score"
                        editable="true"
                        itemEditor="{combofac}"/>
    <mx:DataGridColumn headerText="Salvar" width="50">
    <mx:itemRenderer>
    <mx:Component>
    <mx:VBox width="100%" height="100%">
    <mx:Button label="See the values" click="outerDocument.mostra();"/>
    </mx:VBox>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>

  • Problems with linked ComboBoxes

    Hi everyone, and thanks to those who will reply
    It's been 3 days since i'm having the same problem :
    I have 2 comboboxes in a JPanel, and the things to be displayed in the second one depends on the first (for example selecting 'Hewlett-Packard' in the first combo box display all HP model in the second one)
    When i select a item in the first combobox, an actionPerformed is fired, and i can populate the second combobox. Unfortunately, the combobox disappear in my panel, but if i click on the place where it used to be, the popup list display correctly... !
    I just want to know hox can i make it visible anyway. I've tried combobox2.repaint() method within the actionperformed method (combobox2 is the name of my second combo box as you've guessed), but it doesnt work...
    Something else too : in my first list, if i select another vendor, the list in the second is not removed, but the list of workstation of the second-select manufacturer is appended... I've tried here the combobox2.removeall() method, but here again, no results....
    this is my code :
    public class DocPCConfig extends JFrame implements ActionListener, WindowListener
    /** D�clare les variables utilis�es **/
    JComboBox comboConstructeurs, comboMachines;
    private JPanel imagePanel, panelConstructeur, panelMachines;
    * DocPCConfig()
    * Constructeur par d�faut
    * - But : Initialise les composants Swing de la fen�tre principale
    * - E : -/-
    * - S : -/-
    public DocPCConfig()
    /** Ajoute les composants dans l'onglet **/
    ajoutCompoCstr();
    /** Ajoute un �couteur d'�v�nement de fen�tre **/
    addWindowListener(this);
    * main()
    * - But : Point d'entr�e de l'application
    * - E : String args[] : Tableau de param�tres
    * - S : -/-
    public static void main(String args[])
    System.out.println("Lancement de l'application de configuration");
    new BdD();
    mainFrame = new DocPCConfig();
    mainFrame.setSize(1024,738);
    mainFrame.setTitle("DocPCConfig");
    mainFrame.setVisible(true);
    * ajoutCompoCstr()
    * - But : Ajoute les composants pour le panel de s�lection constructeur/machine (1er onglet)
    * - E : -/-
    * - S : -/-
    public void ajoutCompoCstr()
    java.awt.GridBagConstraints gridBagConstraints1;
    /** Cr�e le vecteur stockant les r�sultats provenant de la BdD **/
    Vector listeConstructeurs = new Vector(10,5);
    /** Se connecte � la BdD **/
    BdD.connecteBdD();
    /** R�cup�re la liste des constructeurs depuis la BdD **/
    listeConstructeurs = BdD.getConstructeurs();
    DefaultComboBoxModel comboModele = new DefaultComboBoxModel(listeConstructeurs);
    BdD.deconnecteBdD();
    /** Lance le constructeur pour la liste d�roulante avec le vecteur de liste
    comme param�tre **/
    comboConstructeurs = new JComboBox(comboModele);
    /** R�gle les param�tres suppl�mentaires **/
    comboConstructeurs.setMaximumSize(new Dimension(5,5));
    comboConstructeurs.setSelectedIndex(-1);
    // comboConstructeurs.setEditable(true);
    /** Ajoute les contraintes graphiques pour la liste des constructeurs **/
    gridBagConstraints1 = new GridBagConstraints();
    gridBagConstraints1.gridx = 1;
    gridBagConstraints1.gridy = 1;
    gridBagConstraints1.insets = new Insets(10, 10, 10, 10);
    panelConstructeur.add(comboConstructeurs, gridBagConstraints1);
    comboConstructeurs.addActionListener(this);
    /** Cr�e les �l�ments de la liste d�roulante **/
    String[] listeMachines = { "                             " };
    comboMachines = new JComboBox(listeMachines);
    comboMachines.setSelectedIndex(0);
    /** Ajoute les contraintes graphiques pour la liste des machines **/
    gridBagConstraints1 = new GridBagConstraints();
    gridBagConstraints1.gridx = 1;
    gridBagConstraints1.gridy = 2;
    gridBagConstraints1.insets = new Insets(10, 10, 10, 10);
    panelConstructeur.add(comboMachines, gridBagConstraints1);
    * actionPerformed(ActionEvent ae)
    * - But : Traiter les op�ration quand une action est effectu�e sur les boutons
    * de l'interface de la fen�tre principale.
    * - E : ActionEvent ae : Un pointeur sur l'action courante.
    * - S :-/-
    public void actionPerformed(ActionEvent ae)
    Object source = ae.getSource();
    /** Liste d�roulante des constructeurs **/
    if (source == comboConstructeurs)
    /** R�cup�re la ligne s�lectionn�e dans la liste **/
    String constructeur = (String)comboConstructeurs.getSelectedItem();
    /** Creation des �l�ments de la liste d�roulante **/
    Vector listeMachines = new Vector(50,1);
    /** Se connecte � la BdD **/
    BdD.connecteBdD();
    listeMachines = BdD.getMachines(constructeur);
    /** Se d�connecte de la BdD **/
    BdD.deconnecteBdD();
    /** Supprime toutes les pr�c�dentes entr�es de la liste des machines **/
    comboMachines.removeAll();
    int i = 0;
    System.out.println(listeMachines.size());
    /** Tant que la liste n'a pas �t� parcourue **/
    while(i < listeMachines.size())
    /** Copie l'�l�ment du vecteur et l'ajoute dans la liste d�roulante **/
    comboMachines.addItem(listeMachines.elementAt(i).toString());
    i++;
    comboMachines.repaint();
    I've removed all the things I found useless, but maybe i've removed too much ;-) I hope that this code is enough.
    Thanks for your help (can you send a copy of your answers at : [email protected] - if you're too lazy to do this that's not a matter, but i don't know how i can find my post in all these posts... so that'd be cool ;-)

    Thanks Martin
    that makes sense now was driving me mad as I couldnt find anything saying it wasnt supported, makes sense seeing as its a flash server. Annoyning thing was it was playing in the content viewer locally when I previewd the folio you would think that would not be the case if it was not supported. Im going to try the rtmp links in a player in a web page and view it on the ipad out of curiosity and ill let you know. Out of interest have you done anyting with imported html into indesign as part of your folios ? I havent as yet but am curious to know how it holds up ?
    Thanks again
    Neil

  • Still having a problem with ComboBox in a Table

    In my JClient app I still can't get a ComboBox to work in a JTable. The ComboBox doesn't display in the table and my pageDef file (below) looks fine to me. Can anyone verify that a ComboBox in a JTable works in the production release or tell me what I'm doing wrong?
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.36.73" id="PanelPersonAddressView8PageDef"
    Package="com.esp.test.pageDefs"
    MsgBundleClass="com.esp.test.pageDefs.PanelPersonAddressView8PageDefMsgBundle">
    <parameters/>
    <executables>
    <iterator RangeSize="-1" Binds="AppModuleDataControl.PersonAddressView1"
    DataControl="AppModuleDataControl" id="PersonAddressView1Iter"/>
    <iterator id="AddressTypeView1Iterator" RangeSize="-1"
    Binds="AddressTypeView1" DataControl="AppModuleDataControl"/>
    <iterator id="PersonAddressView1Iterator" RangeSize="10"
    Binds="PersonAddressView1" DataControl="AppModuleDataControl"/>
    </executables>
    <bindings>
    <table ColumnSort="entireCollection" id="PersonAddressView1"
    IterBinding="PersonAddressView1Iter"
    xmlns="http://xmlns.oracle.com/adfm/jcuimodel">
    <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="PersonId"/>
    <Item Value="AddressId"/>
    <Item Value="AddressTypeId"/>
    <Item Value="ReadOnlyAddress"/>
    </AttrNames>
    <AttrProp name="AddressTypeId">
    <EditorDef RTClass="oracle.jbo.uicli.jui.JULOVEditorPropDef"
    DTClass="oracle.adf.dt.objects.jui.JUDTLOVEditorProp"
    Name="ComboBox" binding="DCComboBox"/>
    </AttrProp>
    </table>
    <combobox id="DCComboBox" xmlns="http://xmlns.oracle.com/adfm/jcuimodel"
    StaticList="false" ListOperMode="0"
    IterBinding="PersonAddressView1Iterator"
    ListIter="AddressTypeView1Iterator">
    <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="AddressTypeId"/>
    </AttrNames>
    <ListAttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="AddressTypeId"/>
    </ListAttrNames>
    <ListDisplayAttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="AddressTypeDesc"/>
    </ListDisplayAttrNames>
    </combobox>
    </bindings>
    </pageDefinition>

    I have a similar problem. I have got the combobox in the jtable working (when i switched off the labels). Everything seems to works except when I select the first record in the combobox. When I tab out of the cell it becomes empty. If I first select a different record( 2-n) and then the first record the value remains when I tab out of the cell. This also looks like a bug to me. Here's my binding code:
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.36.73" id="OpeningsTijdenPanelPageDef"
    Package="store.ui.panel.in3_1_park.pageDefs">
    <parameters/>
    <executables>
    <iterator id="POpeningsTijdView1Iterator" RangeSize="-1"
    Binds="POpeningsTijdView1"
    DataControl="ParkerenAppModuleDataControl"/>
    <iterator id="DagView1Iterator" RangeSize="-1" Binds="DagView1"
    DataControl="ParkerenAppModuleDataControl"/>
    </executables>
    <bindings>
    <table ColumnSort="entireCollection"
    id="ActiviteitParkerenView1POpeningsTijdView1"
    IterBinding="POpeningsTijdView1Iterator"
    xmlns="http://xmlns.oracle.com/adfm/jcuimodel">
    <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="Dagid"/>
    <Item Value="Begintijd"/>
    <Item Value="Eindtijd"/>
    </AttrNames>
    <AttrProp name="Dagid">
    <EditorDef RTClass="oracle.jbo.uicli.jui.JULOVEditorPropDef"
    DTClass="oracle.adf.dt.objects.jui.JUDTLOVEditorProp"
    Name="ComboBox" binding="DCComboBox"/>
    </AttrProp>
    <AttrProp name="Dag">
    <EditorDef RTClass="oracle.jbo.uicli.jui.JULOVEditorPropDef"
    DTClass="oracle.adf.dt.objects.jui.JUDTLOVEditorProp"
    Name="ComboBox" binding="DCComboBox"/>
    </AttrProp>
    </table>
    <combobox id="DCComboBox" xmlns="http://xmlns.oracle.com/adfm/jcuimodel"
    StaticList="false" ListOperMode="0"
    IterBinding="POpeningsTijdView1Iterator"
    ListIter="DagView1Iterator" NullValueFlag="1">
    <AttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="Dagid"/>
    </AttrNames>
    <ListAttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="Dagid"/>
    </ListAttrNames>
    <ListDisplayAttrNames xmlns="http://xmlns.oracle.com/adfm/uimodel">
    <Item Value="Dag1"/>
    </ListDisplayAttrNames>
    </combobox>
    </bindings>
    </pageDefinition>
    Has anyone else encountered this problem?

  • Dropdown won't show (combobox, Menus)

    Hi Everyone,
    I have a problem that's getting on my nerve just a bit. I'm working on a EMR app
    and would like to display a PDF file in my Flex app. I'm using the HTML
    component to display it which works good so far, but my current version of the
    screen is using a PopUpMenuButton to allow selection of a PDF file. My issue is
    that once a selection is made and the PDF is loaded, if I try and select a
    option from the menu again, the dropdown won't display (or its getting covered
    up my the HTML control). I have 3 versions of this form and each have a simular
    problem. THe first version follows:
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute" resize="resizeWindowContents()">
    <mx:ApplicationControlBar dock="true" fillAlphas="[1.0, 1.0]"
    fillColors="[#0E0847, #FFFFFF]">
    <mx:Label text="Select Form" fontWeight="bold" fontSize="12"
    color="#990000"/>
    <mx:ComboBox width="293" id="cmbForms" visible="true" change="changeEvt(event)"
    >
    <mx:dataProvider>
    <mx:ArrayCollection>
    <mx:Object label="822 Individualized Treatment Plan" data="C:\PDF Docs\822
    Individualized Treatment Plan 6-29-2009 (Reader).pdf"/>
    <mx:Object label="822 Psychosocial" data="C:\PDF Docs\822 Psychosocial
    6-3-2009 (Reader).pdf"/>
    <mx:Object label="822 Utilization Review Form" data="C:\PDF Docs\822
    Utilization Review Form (Reader).pdf"/>
    </mx:ArrayCollection>
    </mx:dataProvider>
    </mx:ComboBox>
    <mx:Spacer width="100%"/>
    <mx:Button label="Back"/>
    <mx:Button label="Submit"/>
    </mx:ApplicationControlBar>
    <mx:HTML id="PDFViewer" width="100%" height="100%" resize="ResizeViewer()"
    x="0" y="0"/>
    </mx:WindowedApplication>
    Note: Scripts not shown
    In the version above when the form first loads (without a PDF file) the Dropdown
    on the combobox is visable. Once I select a option and a PDF is loaded the
    dropdown no longer displays in full, meaning it appears that the dropdown gets
    trapped inside the ApplicationControlBar.
    The last version follows:
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:PopUpMenuButton y="0" label="PopUpMenuButton" width="100%" id="pb2"
    labelField="@label"
    showRoot="false"
    dataProvider="{menuData}"
    creationComplete="initData();"
    itemClick="changeEvt(event);"/>
    <mx:HTML id="PDFViewer" width="100%" height="100%" resize="ResizeViewer()"
    x="0" y="21"/>
    <mx:Script>
    <![CDATA[
    import mx.controls.Menu;
    import mx.events.MenuEvent;
    public var pdf:HTMLLoader;
    private function initData():void {
    Menu(pb2.popUp).selectedIndex=0;
    private function ResizeViewer():void{
    if(pdf == null)
    pdf = new HTMLLoader;
    pdf.height = PDFViewer.height
    pdf.width = PDFViewer.width
    [Bindable]
    public var menuData:Array = [
    {label: "Individualized Treatment Plan", data: "0"},
    {label: "Psychosocial", data: "1"},
    {label: "Utilization Review Form", data: "2"}
    private function changeEvt(event:MenuEvent):void {
    var index:int;
    var filepath:String;
    index = event.currentTarget.label;
    switch (index) {
    case 0 :
    filepath = "C://PDF Docs//ITP.pdf";
    case 1 :
    filepath = "C://PDF Docs//Psych.pdf";
    case 2 :
    filepath = "C://PDF Docs//Util.pdf";
    PDFViewer.removeChildAt(0);
    var request:URLRequest = new URLRequest(filepath)
    pdf = new HTMLLoader();
    pdf.height = PDFViewer.height;
    pdf.width = PDFViewer.width;
    pdf.load(request);
    PDFViewer.addChildAt(pdf, 0);
    ]]>
    </mx:Script>
    </mx:WindowedApplication>
    Question, How do I keep the dropdown on top of all other control on the form?
    Thanks for any help.
    Michelle

    An iPod Classic does not use iOS 7.0.4, as suggested in the footer at the bottom of your first post. In fact, it doesn't use iOS, and the iPod's operating system has not been updated in a long while.
    Look on the iPod, under Settings/About and press the centre button until the "version" is displayed. Mine says 1.1.2 PC. You may have a different version, but as far as I know, they have not been updated recently either.
    Has your car been serviced recently? Perhaps the manufacturer has updated the car's stereo, and that is why things have changed.
    By the way, when I connect my iPod Classic to my Mazda, the iPod's display does vary. Sometimes it shows (in the centre of the screen) the name of the first song to be played when connected, even when subsequent songs are being played, other times it says "don't browse iPod while driving". In both cases, it shows the Now Playing song's title at the bottom of the iPod's screen, and scrolls it with the artist name.
    P.S. I noticed these screens while still parked, not whilst driving.

Maybe you are looking for

  • 1099MISC output file for IRS

    Hi: I need quick clarification on 1099MISC output file (DMEE format tree: IDWTFILE_US_1099). In the T record, it has SAP contact information as vendor at the end the record. I wanted to check if we need to change the DMEE file (Format Tree: IDWTFILE_

  • First time Ipod/Itunes user is confused

    OK! I have this Ipod I believe its an Ipod mini as you call it. I just bought the charger and the USB cord the other day and I have very little knowledge about this thing it just sort of fell into my lap. I was told install this Itunes thing to get i

  • Where to view the log

    Hi all, I have log some message via the logger.logT(Severity.ERROR,"error message"), where can I locate the log file to check the error log? What is the log filename ? Can I change the log file name and location? or config my own log file ? Is web dy

  • Schema browser is missing the Scheduler

    When using the Schema Browser view, the Scheduler doesn't show up in the list of objects. I need to switch back to the main 'Connections' view in order to get to the Scheduler option. Is there a reason for that? Can that option be added to the dropdo

  • Router 876 and IOS 12.3 (8) YI2

    I am using SDM 2.2a. I want to use QoS but the SDM replies that i can't because of the IOS. Wich version of IOS Supports QoS on this router?