ComboBox paddingTop

Hey,
I'm trying to add paddingTop to my combobox but apparently
that style doesn't exist anymore. Why would they remove paddingTop
and paddingBottom but keep paddingLeft and paddingRight??
Does anyone have any advice on how to extend this component
to add this capability? I looked at the ComboBox class and the only
thing I found with the padding is the
calculatePreferredSizeFromData function so I added a top padding
but it doesn't seem to do anything. Heres the portion I modified.
if (prompt)
lineMetrics = measureText(prompt);
maxW = Math.max(maxW, lineMetrics.width);
maxH = Math.max(maxH, lineMetrics.height);
maxW += getStyle("paddingLeft") + getStyle("paddingRight");
maxH += this._top;
Any Ideas?
Thanks
-Josh

OK, I made some progress but not what I was looking
for.....Adding the paddingTop only pads each of the items in the
list. I want to add padding to the selected item. Any ideas how
this is rendered?
-Josh

Similar Messages

  • Passing Data from ComboBox to ListBox.

    Hi everyone, I'm new with the whole flex 2 environment and
    i'm need some help getting data passed from a ComboBox to ListBox.
    I don't know whether i'm going about this the right way. Senario,
    the person using this application will be able to select an item in
    the ComboBox and based on the item selected, the listBox get
    data(using an array variable) assigned to that item in the
    ComboBox. I don't know the syntax that is used to achieve this.
    I'll appreciate any information related to getting this problem
    resolved.

    Thanks for the feedback william, it was helpful but it still
    not entirely what i want the list box and combo box to do. After
    the array has been populated in the list box, a selection of item
    can be made to display further details of the item in the list box.
    A quick question will be can parallel array type be created in
    Flex? Trying to accomplish department phone book. The people can
    select the department and it will show the list of people in that
    department. In the list box a selection of the person can be made
    to display more detailed info about the person as name, phone
    number, job title and etc. So far i'm not able to get the connect
    between the combo and list box to display detail person info. Need
    Help, all suggestions will be greatly appreciated. Here's my code
    so far:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Style>
    Panel
    borderStyle: solid;
    headerColors: #e7e7e7, #d9d9d9;
    backgroundAlpha: 100;
    paddingTop: 10;
    </mx:Style>
    <mx:ArrayCollection id="ITpeople">
    <mx:Object>
    <mx:image>images/andrewo.gif</mx:image>
    <mx:name>John Doe</mx:name>
    <mx:title>Weblayout Specialist</mx:title>
    <mx:phonenum>ext. 1028</mx:phonenum>
    <mx:description>IT Department</mx:description>
    </mx:Object>
    </mx:ArrayCollection>
    <mx:ArrayCollection id="Company">
    <mx:Object>
    <mx:comp>IT</mx:comp>
    </mx:Object>
    <mx:Object>
    <mx:comp>Accounting</mx:comp>
    </mx:Object>
    <mx:Object>
    <mx:comp>Customer Service</mx:comp>
    </mx:Object>
    </mx:ArrayCollection>
    <mx:Script>
    <![CDATA[
    import mx.collections.*;
    ]]>
    </mx:Script>
    <mx:Panel layout="absolute" left="10" top="10" right="54"
    bottom="200" title="ICM Phone Directory">
    <mx:ComboBox x="10" y="32" id="cbxCompDept"
    dataProvider="{Company}" labelField="comp" selectedIndex="0" >
    </mx:ComboBox>
    <mx:List id="names" dataProvider="{ITpeople}"
    labelField="name" selectedIndex="0" x="10" y="95" height="268"
    width="165"></mx:List>
    <mx:VBox width="416" y="95" x="206">
    <mx:Image id="picture"
    source="{ITpeople.getItemAt(names.selectedIndex).image}"
    autoLoad="true" />
    <mx:Form id="details">
    <mx:FormItem label="Name: ">
    <mx:Label id="nameInput"
    text="{ITpeople.getItemAt(names.selectedIndex).name}"/>
    </mx:FormItem>
    <mx:FormItem label="Title: ">
    <mx:Label id="titleInput"
    text="{ITpeople.getItemAt(names.selectedIndex).title}"/>
    </mx:FormItem>
    <mx:FormItem label="Phone Number: ">
    <mx:Label id="phoneInput"
    text="{ITpeople.getItemAt(names.selectedIndex).phonenum}"/>
    </mx:FormItem>
    <mx:FormItem label="Department/Company: ">
    <mx:Label id="descInput"
    text="{ITpeople.getItemAt(names.selectedIndex).description}"
    height="120" width="200" />
    </mx:FormItem>
    </mx:Form>
    </mx:VBox>
    </mx:Panel>
    </mx:Application>

  • FormItem label - moving with paddingTop

    i have been trying to line up a formItem label with my custom
    fields and have discovered that with comboBoxes or textInput
    fields, you can move the y location of the formItem label to line
    up horizontally with the comboBox/textInput textfield with the
    'paddingTop' property (of the comboBox/textInput component).
    This is great, however moving the formItem label with the
    field paddingTop property doesn't work with:
    dateFields, as they don't have a paddingTop property,
    a custom field that i created based on a HBox,
    or TextArea fields
    My question - is there an alternative way to move a formItem
    label in the y direction?
    (the reason i ask is that the label isn't sitting nicely
    aligned with my custom fields)

    Probably not the response you want, but...
    Don't use Form. I never have because it is too inflexible,
    and provides too little benefit.
    Tracy

  • Two mxml component share same as combobox

    Hi all,
         I write custom Combobox component. At the first mxml component call Main.mxml , I have added it. Such as:
    ---- Main.mxml component---
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:component="component.*" >
    <mx:VBox>
         <component:AutoSuggest id="stock" dataProvider="{StaticDataCollection.stockArray}" autoCompleteSuggest="true"               styleName="
    myComboBox" width="65" tabEnabled="true" tabIndex="1" change="upperLetter(event)"/>
    </mx:VBox>
    <mx:VBox
    >
    <component:TradingDiary id="tradingDiary" catalogueDetailList="{catalogTotalLst}" selectIndex="{catalogIndex}"/>
    </mx:VBox>
         From above code, I also use TradingDiary component, and at this component, I also used combobox AutoSuggest component such as:
    ---- TradingDiary.mxml component---
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:component="component.*"> 
         ....<mx:VBox id="vbBelongStockName" width="155" paddingTop="5">
     <component:AutoSuggest id="stockCode" dataProvider="{StaticDataCollection.stockArray}" autoCompleteSuggest="true"styleName="
    myComboBox" width="65" change="upperLetter(event)"/>
     </mx:VBox>
          And now, when I operate to this combobox, both combobox at Main.mxml and  TradingDiary.mxml have same action ? How I solve my problem.
         And now, when I operate to this combobox, both combobox at Main.mxml and  TradingDiary.mxml have same action ? How I solve my problem.

    Hi quoc_thai,
    I think since you are giving the same dataProvider StaticDataCollection.stockArray for both of your components and also you are calling the same function on change event ...change="upperLetter(event)". Are you applying the same logic in both the function in your two components...??
    I think StaticDataCollection.stockArray gives you a reference to the static stockArray(Array) of your StaticDataCollection class. Since you are giving the same dataProvider to both of your components I suspect you are facing this problem.
    Thanks,
    Bhasker

  • 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

  • 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?

Maybe you are looking for

  • Error in PHASE ACT_UPG: Upgrade SAP R/3 4.7 to SAP ECC 6.0 EHP

    Hello, I'm facing an error in phase MAIN_SHDRUN/ACT_UPG (see errors below). After searching for the errors I found postings with advice to change R3trans and tp to the newest version. Strangely system did not take the newest kernelpatch I stored in u

  • PDF Maker

    Is Acrobat 8.1.0 compatible with Windows 7?  I cannot get the PDF Maker to work nor can I print to Adobe.

  • Freeze Pane In OBIEE report

    Does anybody know we can freeze some columns in Answers the way we do it in excel. Thx

  • Duplicated home movies

    Hello.  I am losing precious local storage to duplicated home movie content that is also on an external drive.  I don't know if the root cause is iMovie or iTunes.  I could sure use some insight. Here's my hardware environment: 15 inch MacBook Pro mi

  • Import limited rows from dmp file

    I am using oracle 10g. Due to an error, I have to skip a particular row from import. I've already imported the rows before the one to be skipped. Plz suggest how to import the remaining rows.