Combo select

HI All,
I have one requirement that is we had to display data depending up on our combo select
That is if we select one item in a combo it should display items accordingly in a matrix. It means if we are having 5 columns.
Thanx and Regards,
krishna.v

Hi,
Use the Combo Select Event and refill the matrix.
Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
If pVal.ItemUID = "cmbApStats" Then
           'Code for Refilling the matrix
End IF
Hope it helps.
Regards,
Vasu Natari.

Similar Messages

  • Problem  in Combo Select

    Hi,
    In my form i have a combo. My requirement is, for example i load 5 data A,B,C,D,E in combo. First i select the 'A' and load the corresponding elements in the matrix, next i select 'B' and the corresponding elements of 'B'  was loaded in matrix now again i select 'A ' it should check 'A' is already selected and the corresponding elements are already displayed in matrix again the elements of 'A' should not be loaded in matrix. Plz tell how to check this.
    Thanks in Advance.
    Regards,
    Madhavi

    Hi Madhavi,
    here are the main parts of my little example.
    Some hints:
    The form is managed in a shared class (only one form at a time)
    The Matrix is loaded via a DataTable
    The Matrix is ReLoaded on every time the "ABCDE-Combo" is selected (except the value is already selected)
    In the example I load Businesspartners into matrix where their CardName starts with A or B or....or E (you must adapt it for your needs)
    SboCon.SboDI is the SAPbobsCOM.Company
    SboCon.SboUI is the SAPbouiCOM.Application
    Some global vars (initialize them somewhere when the form is opened!):
        Private Shared oForm As SAPbouiCOM.Form
        Private Shared oUds As SAPbouiCOM.UserDataSources
        Private Shared oDts As SAPbouiCOM.DataTables
        Private Shared oDtBp As SAPbouiCOM.DataTable
        Private Shared oMtxBp As SAPbouiCOM.Matrix
        Private Shared SelVals As System.Collections.ArrayList ' The values of the combo which already selected by the user
    Init the vars somewhere (where you normally do this) on form load:
                oForm = '...set it in your way
                oDts = oForm.DataSources.DataTables
                oUds = oForm.DataSources.UserDataSources
                oMtxBp = oForm.Items.Item("MTX_BP").Specific
               ' DataBinding and related:
                '### Data Tables
                oDts.Add("DT_BP")
                '### UserDataSources
                '# ABCDE Combo:
                oUds.Add("UDS_SELBP", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 100)
                oForm.Items.Item("CBX_SELBP").Specific.databind.setbound(True, "", "UDS_SELBP")
                '### Fill ABCDE Combo
                oForm.Items.Item("CBX_SELBP").DisplayDesc = True
                oCbx = oForm.Items.Item("CBX_SELBP").Specific
                oCbx.ValidValues.Add("0", "Please select...")
                For val As Integer = Asc("A") To Asc("E")
                    oCbx.ValidValues.Add(Chr(val), "Load " & Chr(val) & " BP")
                Next
                oUds.Item("UDS_SELBP").ValueEx = "0"
    The Combo Select Event:
                If pVal.ItemUID = "CBX_SELBP" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT Then
                    If Not pVal.BeforeAction Then
                        If oUds.Item("UDS_SELBP").ValueEx != "0" Then
                            Dim oCbx As SAPbouiCOM.ComboBox = oForm.Items.Item("CBX_SELBP").Specific
                            If SelVals.Contains(oUds.Item("UDS_SELBP").ValueEx) Then
                                ' BP already selected - do nothing
                                SboCon.SboUI.StatusBar.SetText("Already selected!")
                            Else
                                If Not SelVals.Contains(oUds.Item("UDS_SELBP").ValueEx) Then
                                    SelVals.Add(oUds.Item("UDS_SELBP").ValueEx)
                                End If
                                Dim query As String
                                oDtBp.Clear()
                                oMtxBp.Clear()
                                ' Build query for BPs where their names starts with the Combo-Value
                                query = "SELECT CardCode, CardName FROM OCRD WHERE "
                                For i As Int16 = 0 To SelVals.Count - 1
                                    If i > 0 Then query &= " OR "
                                    query &= "CardName LIKE '" & SelVals(i) & "%' "
                                Next
                                query &= " ORDER BY CardName"
                                ' load the MTX via DataTable (reloaded every time based on collected combo-values)
                                oDtBp.ExecuteQuery(query)
                                With oMtxBp.Columns
                                    ' Zeilen-Nr.
                                    .Item("0").DataBind.Bind("DT_BP", "CardCode")
                                    .Item("1").DataBind.Bind("DT_BP", "CardName")
                                End With
                                oMtxBp.LoadFromDataSource()
                                oMtxBp.AutoResizeColumns()
                                SboCon.SboUI.StatusBar.SetText(oUds.Item("UDS_SELBP").ValueEx & " added!", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                            End If
                            ' reset Combo to "Please select..."
                            oUds.Item("UDS_SELBP").ValueEx = 0
                        End If
                    End If
                End If
    ATTENTION: REPLACE the "!=" with less (<)/greater(>) symbol, they're not shown in ths forum
    I hope I didn't forget sth. - here it works..
    Cheers,
    Roland
    Edited by: Roland Toschek on Sep 25, 2008 11:54 AM

  • How to set condition in choose from list based on the combo selection

    Dear Members,
         i have a requirement to filter the item based on the itemgroup. After choosing the itemgroup in the dropdown list i have to filter the item for the particular group in the choose from the list.since i have tried in the combo select it doesnt work out for me.any body can suggest me is it doable. if so pls tell me the work around.
    My coding is as follows..
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
    if pval.itemUID="Cmb"
                                objChooseCollection = objForm.ChooseFromLists
                                objChooseFromList = objChooseCollection.Item("CFL1")
                                objConditions = objChooseFromList.GetConditions()
                                objcondition = objConditions.Add()
                                objcondition.Alias = "itmsgrpcod"
                                objcondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                                objcondition.CondVal = Form.items.item("Cmb").specific.selected.value
                                objChooseFromList.SetConditions(objConditions)
    End if
    With Regards,
    jai.
    Edited by: JaiShankarRaman on Dec 23, 2009 10:47 AM

    Hello,
    Following is a code sample which I am using:
            Dim oForm As SAPbouiCOM.Form
            Dim oMatrix As SAPbouiCOM.Matrix
            Dim oChooseFromList As SAPbouiCOM.ChooseFromList
            Dim oConditions As SAPbouiCOM.Conditions
            Dim oCondition As SAPbouiCOM.Condition
            Dim CodeType As Integer
            Try
                oForm = oPayOn.SBO_Application.Forms.GetForm(CflEvent.FormTypeEx, CflEvent.FormTypeCount)
                oMatrix = oForm.Items.Item("AC_MATRIX").Specific
                oChooseFromList = oForm.ChooseFromLists.Item("ACC_CFL1")
                CodeType = oMatrix.Columns.Item("AC_MC00").Cells.Item(CflEvent.Row).Specific.Selected.Value
                oConditions = oChooseFromList.GetConditions
                If oConditions.Count > 0 Then
                    oCondition = oConditions.Item(0)
                Else
                    oCondition = oConditions.Add
                End If
                oCondition.Alias = "U_CodeType"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCondition.CondVal = CodeType
                oChooseFromList.SetConditions(oConditions)
            Catch ex As Exception
                'oPayOn.SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
            End Try
        End Sub
    I am calling this in the CFL event - before action. So when the user clicks on CFL button - but before it opens - this code is called and the condition is applied. Here AC_MC00 is a combo column in a matrix.
    Regards
    Rahul Jain

  • Combo Select in Matrix

    Hi to all,
    I have a problem in combo Select in Matrix. I have a form with A matrix and One Column as a combobox. This Column is bind to one of the field of Table.
    I have loaded the combo with valid values, but when i select the combo item, it is not set in that column, i.e No value.
    regards
    Bikram

    Hi,
    Have you added a row to the matrix after initialisation of the column with the valid value ? if not add a row to the matrix. Check the below code
    SAPbouiCOM.Matrix oMatrix = null;
    SAPbobsCOM.Recordset oRecordset = null;
    LoadFromXML("frmLMM.srf");
    Global.oForm = Global.SboApplication.Forms.Item("frmLMM");
    oRecordset = (SAPbobsCOM.Recordset)(Global.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset));
    oRecordset.DoQuery("select UnitDisply,UnitName from owgt");
    oRecordset.MoveFirst();
    oMatrix = (SAPbouiCOM.Matrix)(Global.SboApplication.Forms.Item("frmLMM").Items.Item("MtrxSrvc").Specific);
    for (int i = 0; i < oRecordset.RecordCount; i++)
                       oMatrix.Columns.Item("colUom").ValidValues.Add(oRecordset.Fields.Item("UnitDisply").Value.ToString(),
                       oRecordset.Fields.Item("UnitName").Value.ToString());
                        oRecordset.MoveNext();
    oMatrix.AddRow();
    Regards,
    Noor

  • When combo selected, user form sholud be open

    Hi
    In system form, when value is selected in the combo box, at same time  user form should be opened. what is the coding for this process? can anyone help me..
    Regards
    Bhuvana

    Hi Bhuvana
    in the combo select event use this code to get your User form to load
    LoadFromXML("solution.srf")(Name of the srf file)
    oform = oapp.Forms.Item("solut")(FormUID)
      service_solution() (databinding)
    this is an easy way to load a form the for this use should have LoadFromXml() function like this
    Public Sub LoadFromXML(ByVal FileName As String)
            Dim oXmlDoc As New Xml.XmlDocument
            Dim sPath As String
            Try
    sPath = IO.Directory.GetParent(Application.StartupPath).ToString
                oXmlDoc.Load(sPath & "\" & FileName)
                oapp.LoadBatchActions(oXmlDoc.InnerXml)
            Catch ex As Exception
                oapp.MessageBox(ex.Message)
            End Try
        End Sub
    if this helps do reward points
    Edited by: Cool Ice on Jul 28, 2008 12:44 PM

  • Combo selection problem

    Hello,
    I have a problem with a combo box. I've uploaded the combobox with data from a table:
    string sSQL = "SELECT BankCode, BankName FROM ODSC";
    oRs.DoQuery(sSQL);
    oRs.MoveFirst();
    for (int i = 0; i < oRs.RecordCount; i++)
    oComboBox.ValidValues.Add(oRs.Fields.Item("BankCode").Value.ToString(), oRs.Fields.Item("BankName").Value.ToString());
      oRs.MoveNext();
    In the variable dfltbank, I have a bank which i want to select in the combobox:
    oComboBox.Select(dfltbank, APbouiCOM.BoSearchKey.psk_ByValue); (in the constructor of the class).             
    I also have an item event on this combobox et_COMBO_SELECT.
    The problem is that event gets triggers when the form is loading because of my selection above and i get "Object not set to an instance of an object" (the class the forms load in is null, because the event got triggered before the constructor of the class finished).
    How can i solve this?
    Thank you in advance,

    Have you tried checking for the pval.InnerEvent status?  That will help to ferret out events that happen internally in code vs events that are caused by the user explicitly.
    If pval.InnerEvent = True then
      'do this
    Else
      'do that
    End If

  • Combo selection - Trouble

    Hi guys,
    Have made a small test application to tell my problem.
    Have rendered a table with a comboBox.Everything works fine,the way I wanted it to be, apart from the following things.
    [1]
    When the user Doubleclicks on one of the combocells,the comboitem in the combobox is already displayed on the tablecell.I dont want it to be like that.
    I want the comboitem to be displayed on the tablecell only when the user explicitly goes and selects the comboitem.If the user doublciks on the cell as said before,the old cell value should remain.
    [2]
    How to catch a combo close up event when the user explicitly selects an item from the combo.Because I want to do something when the user does so....
    see Pic:
    http://i337.photobucket.com/albums/n399/turniphorse/ComboSelection.jpg
    Iam attaching the code(running) also along with this....
    Any help is greatly appreciated.
    Thanks.
    package set.test;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.Point;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.util.Vector;
    import javax.swing.DefaultCellEditor;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.ListSelectionModel;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumn;
    public class TableCellColour extends JPanel {
             private int tableHilightedRow, tableHilightedCol;
             JTable table = null;       
             private Vector rowData;
              private Vector columnNames;
              private JButton jButton = null;  //  @jve:decl-index=0:visual-constraint="348,164"
    public TableCellColour(){
         super(new GridLayout(1,0));
         rowData = new Vector();
         columnNames = new Vector();
         this.columnNames.addElement("Entry Type");
         this.columnNames.addElement("First");
         this.columnNames.addElement("Last");
         this.tableHilightedRow = -1;
         this.tableHilightedCol = -1;
         table = new JTable(new MyTableModel(rowData,columnNames));
         addRows();
         table.setPreferredScrollableViewportSize(new Dimension(500,70));     
         JScrollPane scrollpane = new JScrollPane(table);
         //Create the scroll pane and add the table to it.
        JScrollPane scrollPane = new JScrollPane(table);
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        //table.setSelectionBackground(Color.YELLOW);
        table.addMouseListener(new MouseHandler());     
        setUpStartEndRangeColumn(table);
            add(scrollPane);
            add(getJButton());
    private void addRows(){
         Vector row = new Vector();     
         row.addElement("");
         row.addElement("555");
         row.addElement("566");
         MyTableModel myModel = (MyTableModel) this.table.getModel();
         myModel.addRow(row);
         Vector row1 = new Vector();
         row1.clear();
         row1.addElement("");
         row1.addElement("655");
         row1.addElement("666");     
         myModel.addRow(row1);
         Vector row2 = new Vector();
         row2.clear();
         row2.addElement("");
         row2.addElement("755");
         row2.addElement("766");     
         myModel.addRow(row2);
         Vector row3 = new Vector();
         row3.clear();
         row3.addElement("");
         row3.addElement("855");
         row3.addElement("866");     
         myModel.addRow(row3);
    public void setUpStartEndRangeColumn(JTable table){
         // These are the combobox values          
         JComboBox comboBox1 = new JComboBox();
         comboBox1.addItem("First");
        //sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
         //JComboBox comboBox = new JComboBox(values1);     
         MyComboBoxEditor cellEditor = new MyComboBoxEditor(comboBox1);
         TableColumn startRange = table.getColumnModel().getColumn(1);
         //startRange.setCellEditor(new DefaultCellEditor(comboBox));
         startRange.setCellEditor(cellEditor);
         MyComboBoxRenderer  comboRenderer= new MyComboBoxRenderer();
         DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
         startRange.setCellRenderer(comboRenderer);  
         JComboBox comboBox2 = new JComboBox();
         comboBox2.addItem("Last");
         TableColumn endRange = table.getColumnModel().getColumn(2);
         MyComboBoxEditor cellEditor2 = new MyComboBoxEditor(comboBox2);
         endRange.setCellEditor(cellEditor2);
         DefaultTableCellRenderer renderer2 = new DefaultTableCellRenderer();
         endRange.setCellRenderer(comboRenderer);
    public void setTableRowColSelection() {
         if (tableHilightedRow != -1)
              table.setRowSelectionInterval(0, tableHilightedRow);
         if (tableHilightedCol != -1)
              table.setColumnSelectionInterval(0, tableHilightedCol);
    public class MyTableModel extends DefaultTableModel{
         public MyTableModel(Vector rowDataSet, Vector columnNamesSet) {
              super(rowDataSet, columnNamesSet);
         public Class getColumnClass(int columnIndex) {
              return getValueAt(0, columnIndex).getClass();
         public boolean isCellEditable(int row,int col){
                 if(col<1)
                   return false;
                   else
                        return true;
         public void setValueAt(Object value,int row,int col){
              super.setValueAt(value, row, col);
    public class MyComboBoxEditor extends DefaultCellEditor {
         private static final long serialVersionUID = 1L;
         public MyComboBoxEditor(JComboBox combo) {
             super(combo);         
             setClickCountToStart(2);         
       public void setClickCountToStart(int count)  {
            super.setClickCountToStart(count);       
    public class MyComboBoxRenderer extends JComboBox implements TableCellRenderer {
         int highlightRow = -1;
         int highlightCol = -1;
        public MyComboBoxRenderer() {
           super();
           setOpaque(true);     
        public Component getTableCellRendererComponent(JTable table, Object value,
                boolean isSelected, boolean hasFocus, int row, int column) {
              if (row == highlightRow && column == highlightCol) {
                   setBackground(Color.yellow);
              else if (isSelected) {
                  // setBackground(Color.yellow);
                    setForeground(table.getSelectionForeground());
                  super.setBackground(table.getSelectionBackground());
              } else
                   //setBackground(Color.yellow);
                    setForeground(table.getForeground());
                    setBackground(table.getBackground());               
              setBorder(null);          
              removeAllItems();
              addItem( value );          
              return this;
        public void setHighlightCell(int row, int col) {
              highlightRow = row;
              highlightCol = col;
              tableHilightedRow = highlightRow;
              tableHilightedCol = highlightCol;               
              setTableRowColSelection();
    class MouseHandler extends MouseAdapter {
        public void mousePressed(MouseEvent e) {
            JComboBox comp = null;
            Point p = e.getPoint();
             int row = table.rowAtPoint(p);
              int col = table.columnAtPoint(p);          
              int click = e.getClickCount();
              MyComboBoxRenderer render = (MyComboBoxRenderer) table.getCellRenderer(row, col);
              String eVal = (String)table.getValueAt(row,col);
              comp = (JComboBox) render.getTableCellRendererComponent(table,eVal,true,true,row,col);
              if(click==1&& (row != -1) && (col != 0))
                   render.setHighlightCell(row, col);
           table.repaint();               
    private static void  createAndShowGUI(){
         JFrame frame = new JFrame("TableComBoBox");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         TableCellColour newContentPane = new TableCellColour();     
         newContentPane.setOpaque(true);
         frame.setContentPane(newContentPane);
         frame.pack();
         frame.setVisible(true);
    * This method initializes jButton     
    * @return javax.swing.JButton     
    private JButton getJButton() {
         if (this.jButton == null) {
              jButton = new JButton();
              jButton.setSize(new Dimension(176, 29));
              jButton.addActionListener(new java.awt.event.ActionListener() {
                   public void actionPerformed(java.awt.event.ActionEvent e) {
                        table.getModel().setValueAt("Test",0, 1);
                        table.repaint();
         return jButton;
    public static void main(String[] args) {
        //Schedule a job for the event-dispatching thread:
        //creating and showing this application's GUI.
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {           
               createAndShowGUI();
    }

    [2] - Use a TableModelListener - whenever the data in the cell is changed a TableModel event is fired.

  • Depend on first combo selection, second combo should disable and enable

    hi
    i am using jstl and jsp. I have two combos , first combo has 4 items
    when clicking the 3rd item and 4 th items second combo should
    be disabled( that means he should not select second combo items)
    combo items are not hardcoded they are polulating by mapping through hibernate to database. Please help me how to do it by
    using javascript or jstl conditions.
    can any body help me please...this is urgent
    thanks
    jalandhar
    Message was edited by:
    jalandhar
    Message was edited by:
    jalandhar

    Hi,
    This is not a javascript forum, please google for a javascript forum. (Javascript is not java)
    Kaj

  • Combo select value

    I have a problem with comobox select. I have build a form with 3 comboboxes. I added to the form a button for clear all the controls values in the form. When I am in the find mode nad i want to clear the combobox selected value it does not clear the value. and this is only when I am in find mode.
    I have also added the empty value to the combo datasource.
    the code is something like this:
    oCombo.Select(string.Empty, SAPbouiCOM.BoSearchKey.psk_ByValue);
    string selectedValue = _cmbCausale.Selected.Value;
    The problem is that  when I am in find mode the selectedValue it is not string.Empty but it is the last selected value from the form.
    does any one have any suggestion?

    HI,
    Set the datasource value to clear the combobox, then it will work.
    Regards
    J.

  • On combo selection, components visibility need to change

    1) I have one combobox --> with values 1, 2, 3
    2) If i am selecting 1, one textfield need to be shown
    3) If i am selecting 2, one calendar need to be shown
    4) If i am selecting 3, 2 textfields need to be shown
    How it can be achived using JSF/Richfaces package

    Hello DJChase,
    first off, the maximum amount of video (incl. slideshow and DVD menu) for an SL DVD is two hours, so wether you will be able to fit in everything will depend on the overall length of everything.
    When exporting from FCP you should generally export as QT movie and not use the QT Conversion option, as this usually degrades the video somewhat (even if the export settings match the sequence settings).
    Question here: if you're using FCP, why don't you create the DVD using DVDSP/Compressor? The output quality will surely surpass that of iDVD.
    hope this helps
    mish

  • Combo select  event is very show?

    when i select value by combox  it wiil very show. please help me
    if i select order no=2  aginst when another value selected  its very show
    please help me.
    If (pVal.ItemUID = "OrVal") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) Then
                Dim sSQL As String
                'Dim sname As String
                Dim ocombo3 As SAPbouiCOM.ComboBox
                ocombo3 = oForm.Items.Item("OrVal").Specific   ''''' combox of order no
                rs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                sSQL = "SELECT T0.[DocDate],T1.[Price],cardname, U_calM,U_MTrip,U_WghT ,U_Ttype FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.DocEntry  ='" & Trim(ocombo3.Selected.Value) & "' "
                rs.DoQuery(sSQL)
                oEdittext = oForm.Items.Item("OrdtVal").Specific
                oEdittext.String = Format(rs.Fields.Item("DocDate").Value, "ddMMyy")
                oForm.Items.Item("CustVal").Specific.value = rs.Fields.Item("cardname").Value
                oForm.Items.Item("Sitem").Specific.value = rs.Fields.Item("Price").Value
                oForm.Items.Item("CalVal").Specific.string = rs.Fields.Item("U_calM").Value
                oForm.Items.Item("MVal").Specific.string = rs.Fields.Item("U_MTrip").Value
                oForm.Items.Item("WVal").Specific.value = rs.Fields.Item("U_WghT").Value
                oForm.Items.Item("TVal").Specific.string = rs.Fields.Item("U_Ttype").Value  
            End If

    when i select value by combox  it wiil very show. please help me
    if i select order no=2  aginst when another value selected  its very show
    please help me.
    If (pVal.ItemUID = "OrVal") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) Then
                Dim sSQL As String
                'Dim sname As String
                Dim ocombo3 As SAPbouiCOM.ComboBox
                ocombo3 = oForm.Items.Item("OrVal").Specific   ''''' combox of order no
                rs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                sSQL = "SELECT T0.[DocDate],T1.[Price],cardname, U_calM,U_MTrip,U_WghT ,U_Ttype FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.DocEntry  ='" & Trim(ocombo3.Selected.Value) & "' "
                rs.DoQuery(sSQL)
                oEdittext = oForm.Items.Item("OrdtVal").Specific
                oEdittext.String = Format(rs.Fields.Item("DocDate").Value, "ddMMyy")
                oForm.Items.Item("CustVal").Specific.value = rs.Fields.Item("cardname").Value
                oForm.Items.Item("Sitem").Specific.value = rs.Fields.Item("Price").Value
                oForm.Items.Item("CalVal").Specific.string = rs.Fields.Item("U_calM").Value
                oForm.Items.Item("MVal").Specific.string = rs.Fields.Item("U_MTrip").Value
                oForm.Items.Item("WVal").Specific.value = rs.Fields.Item("U_WghT").Value
                oForm.Items.Item("TVal").Specific.string = rs.Fields.Item("U_Ttype").Value  
            End If

  • IllegalArgumentException on combo field selection in Jtable

    I am developing a swing based application using j2sdk1.4. In one of the screens, there is a Table with one of its column having a combo box as its field. It works fine till some other tabpane selection is done. On retrying to change the combo selection, it throws following exception:
    java.lang.IllegalArgumentException: focusCycleRoot is not a focus cyle root of aComponent
         at javax.swing.SortingFocusTraversalPolicy.getComponentAfter(SortingFocusTraversalPolicy.java:195)
         at javax.swing.LayoutFocusTraversalPolicy.getComponentAfter(LayoutFocusTraversalPolicy.java:85)
         at javax.swing.LegacyGlueFocusTraversalPolicy.getComponentAfter(LegacyGlueFocusTraversalPolicy.java:63)
         at java.awt.Component.nextFocusHelper(Component.java:6156)
    Afterwards the focus behaves errotically and above exception recurs.
    Pls give solution/insight to above problem.

    java.lang.IllegalArgumentException: focusCycleRoot is not a focus cyle root of aComponent
         at javax.swing.SortingFocusTraversalPolicy.getComponentAfter(SortingFocusTraversalPolicy.java:195)
         at javax.swing.LayoutFocusTraversalPolicy.getComponentAfter(LayoutFocusTraversalPolicy.java:85)
         at javax.swing.LegacyGlueFocusTraversalPolicy.getComponentAfter(LegacyGlueFocusTraversalPolicy.java:63)
         at java.awt.Component.nextFocusHelper(Component.java:6278)
         at java.awt.Container.nextFocusHelper(Container.java:2433)
         at java.awt.Component.removeNotify(Component.java:5557)
         at java.awt.Container.removeNotify(Container.java:2069)
         at javax.swing.JComponent.removeNotify(JComponent.java:4299)
         at java.awt.Container.remove(Container.java:713)
         at java.awt.Container.remove(Container.java:766)
         at javax.swing.JTable.removeEditor(JTable.java:3773)
         at javax.swing.JTable.editingStopped(JTable.java:3130)
         at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:124)
         at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:328)
         at javax.swing.DefaultCellEditor$3.stopCellEditing(DefaultCellEditor.java:138)
         at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:213)
         at javax.swing.DefaultCellEditor$EditorDelegate.actionPerformed(DefaultCellEditor.java:345)
         at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1196)
         at javax.swing.JComboBox.setSelectedItem(JComboBox.java:561)
         at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:597)
         at javax.swing.plaf.basic.BasicComboPopup$ListMouseHandler.mouseReleased(BasicComboPopup.java:749)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:228)
         at java.awt.Component.processMouseEvent(Component.java:5134)
         at javax.swing.plaf.basic.BasicComboPopup$2.processMouseEvent(BasicComboPopup.java:452)
         at java.awt.Component.processEvent(Component.java:4931)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3639)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java:3480)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
         at java.awt.Container.dispatchEventImpl(Container.java:1609)
         at java.awt.Window.dispatchEventImpl(Window.java:1590)
         at java.awt.Component.dispatchEvent(Component.java:3480)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

  • Combo box in UI (drop down)

    hai,
    i am new to UI, i connect a datasource to combo box, when i navigate move first, next & last the records changing in combo, but i have a problem that "The contents of Combobox cannot drop down /Listed" can any one help me, its Urgent ?

    Hello
    you navigate using sap databrowser or custom controls made by you?
    about selecting by index you may try
    combo.select(index,psk_Index )
    where combo is your combobox and index is the index you want to select, take a watch at help of combobox ui api (you may select by name,value or index)
    i'm not sure about if is this that you want.
    I hope that this help you,please post some code if not
    best regards
    Salvador Biot
    Message was edited by: Salvador Biot

  • Combo box in the system form

    HI
    We r assuming  " freezing = Absent"
    When we select " freezing" in the combo box in the system form, "Absent" should be displayed in the matrix for the particular  row in the user form.
    Freezing should be displayed as Absent
    Working should be  displayed as Present
    what is the coding for this process . can anyone help me...
    Regards
    Bhuvana
    Edited by: bhuvana eshwari on Jul 30, 2008 6:45 AM

    Hi Bhuvana,
    In the combo Select Event, get the user form and then get the matrix then set the value. The code sample is as follows.
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
                                If oCmbBox.Selected.Value = Freezing Then
                                     oForm = getForm("UserFormID")      
                                     objMatrix = oForm.Items.Item("UID").Specific
                                       objedit = objMatrix.Columns.Item("V_14").Cells.Item(pVal.Row).Specific
    ObjEdit.String = Absent
    ElseIF oCmbBox.Selected.Value = Working
               'Use same logic
    EndIF
    Reward with points if helpful.
    Regards,
    Vasu Natari.

  • Value of two combo box is not persistent on change of a third combo box

    Hi All:
    I have flex page in which i have 3 combo boxes. I would be
    selecting first 2 combo box and when i select the third combo box ,
    i would get the value of previous two combo selection and display
    data accordingly.
    My problme here is when i do a change in 3rd combo box the
    values of other combo boxed are defaulted to "Select..." without
    maintaining my previous selection.
    I am stuck in this for a while. I would really appreciate if
    you can help me out in this.
    Thanks
    Kan

    there's a typo.  fix it or remove it:
    var a:Number;
    var b:Number;
    function First(evt:Event):void{
        a = evt.target.value;
    trace(a);
       compareF();
    cbFirst.addEventListener(Event.CHANGE, First);
    function Second(evt:Event):void{
        b = evt.target.value;
        trace(b);
    compareF()
    cbSecond.addEventListener(Event.CHANGE, Second);
    function compareF(){
    If (a > b){
         trace("a is greater")
    else
         trace(b is greater);

Maybe you are looking for

  • How to get HttpServletRequest parameters from two forms in a JSP

    I have this JSP with two forms calling the same servlet. Problem is, when I use a submit button in the second form, I am unable to retrieve the request parameters from the form through the servlet. I am wondering if anybody could give me some info on

  • Spry Drop Down menu issue in IE

    I created a menu bar with Spry and it works fine in Firefox but playing up in IE. The drop down menu starts displaying from the top of the page and not where the menu bar is. I have never come across this issue with Spry and cannot figure out whats w

  • Fastest method for searching within a PDF file?

    I have created a PDF document that holds all document reports for the last 10 years. It is currently 30,000 pages. As time goes on, incoming reports append to this PDF. This has proven to be an excellent way of holding and retrieving information, all

  • HTMLLoader SWF fullscreen problem

    The Adobe Air help docs say that SWF content loaded into an HTMLLoader object will disappear if the HTMLLoader object is scaled to a factor greater than 1. Does that mean that there's no way to display SWF content in an HTMLLoader object when the Air

  • HT1941 My MacBook Air was stolen.

    How do I find the serial number online? I connected it to Google Docs and iCloud all the time. Also, is there a way to activate Find My Mac? I'm in a panic here. Thanks.......