Problem with ComboBox / Matrix

Hi all,
I have this problem... when I try to populate a column with comboxbox ...
Code:
        Set co = lmatrix.Columns.Add("orgDist", it_COMBO_BOX)
            co.TitleObject.Caption = "Dist"
            co.Editable = True
            co.Visible = True
            co.DataBind.SetBound True, "@DIST", "Code"
        Set DBSource = lfrm.DataSources.DBDataSources.Item("@DIST")
            DBSource.Query
            For x = 0 To DBSource.Size - 1
                tp1 = Trim(DBSource.GetValue("Code", x))
                tp2 = Trim(DBSource.GetValue(3, x))
                co.ValidValues.Add tp1, tp2
                DBSource.Offset = x
            Next
- at the 'co.ValidValues.Add tp1,tp2' I receive this error
  'Valid Value - The Value Exceed boundaries'
- tp1 max value is of 8 Char
- tp2 max value is of 50 Char
I've try to insert manually the value like validvalue.add "101","23123123....213" and it work correctly..
where is my error??
Bye!!
PS: Sorry for my english

Hi,
There's no problem with your code itself (however you don't need to set the DBDataSource offset, if you are only filling the ComboBox - GetValue picks the right data anyway...). It works fine (at least with 2004 PL23 + 2005 Build 119).
Looks like a problem with your data (or some "old" bug, but this would be the first time I heard about it...)?
...or did you solve it in the meantime?
Regards,
Frank

Similar Messages

  • HTMLLoader problem with comboBox

    hi guys
    I'm trying to loader pdf file using XML to retrieve the URL  and I have CombBox to list all the files ,and I need to load another file every time I change the silder for the CombBox
    the problem is the pdf file load only first time and dosent  change if I select another one from the list, I dont know what the the probelm I tried manything like removeChild and I tried to use container but no change, only first time the file loaded
    this is the code
    cb_list.addEventListener(
    SliderEvent.CHANGE,changehandler);
    function changehandler(e:Event):void {
        var sort1:String=cb_list.value;
        var id:String = myXML.tip.(title == sort1)[email protected]();
         //trace(id)
        var slectedtip = myXML.tip.(title == sort1).fulltip.text();
        tit_label.text=myXML.tip.(@ID == id).title .text();
        date_label.text=myXML.tip.(@ID == id).date.text();
        full_tip.text=myXML.tip.(@ID == id).fulltip.text();
         var flashfileURL = myXML.tip.(@ID == id).picURL.text();
        swfURL.text=flashfileURL;
        var url:String = new String();
        url= myXML.tip.(@ID == id).picURL.text().toXMLString();
        var requestpdf:URLRequest=new URLRequest(url);
         var container:Sprite = new Sprite();
        var pdf = new HTMLLoader();
        pdf.height=stage.stageHeight-150;
        pdf.width=stage.stageWidth-270;
        pdf.y=100;
        pdf.x=260;
        pdf.load(requestpdf);
           pdf.addEventListener(Event.COMPLETE, completeHandler);
        function completeHandler(event:Event):void {
            addChild(pdf);

    [problem with combobox comes infront of popup window|http://forum.java.sun.com/thread.jspa?threadID=5291468]

  • Problem with combobox gets dispalyed infront of popup window

    when ever popup window is open and kept on combobox ,combobox appears in front or overlaps the popup window,where exactly i have to check the code.which place of code i have to look into... plz help if there is any problem with css then plz specify which property i have to look into..

    [problem with combobox comes infront of popup window|http://forum.java.sun.com/thread.jspa?threadID=5291468]

  • Problem with the Matrix State

    Hi Guys,
    I am facing a problem with the use of the matrix.
    I am not able to select cells from the matrix with a click  although I set the SelectMode = ms_Auto.
    does someone know how to solve this problem ??
    Thanks
    Bop

    Hi Peter,
    It depends on what selection style you want the grid to have.  I usually set the selection mode to ms_None, this mode allows you to select the individual cells. The ms_Auto selection mode enables an entire row to be selected.
    Regards, Lita

  • Custom DataGrid problems with Comboboxes

    I am using a custom datagrid with comboboxes and
    colorpickers. I found this code on the web and adapted it to work
    with my code. The only problem is that if you pull down a combobox
    and then click somewhere outside without selecting anything, it
    seems to erase the data in the dataprovider arraycollection and so
    'value' in the set data method becomes null.

    This is not a bug if I understand you properly. I believe most people would wish anything which is obtained via the tv to be backed up, which is why the content is transferred. If you want it to remain available on the tv you will need to sync it back to it.

  • Problem with comboBox editor

    Hi experts,
    i am keeping a combobox renderer and editor in my JTable for 2 columns say 5th column and 7th column.
    In renderer no Problem.
    But while i am editing ,whenever i am choosing a perticular item from the drop down in the first row of table,it is affecting the remaining set of rows.,not all the rows also.
    for example,next 5 rows are getting the same selected value.
    next some 2 rows are getting affected.
    the below 2 class are my renderer and editor.public class ComboBoxRenderer extends JComboBox implements TableCellRenderer {
            public ComboBoxRenderer(String[] items) {
                            super(items);
            public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                    if (isSelected) {
                    // Select the current value
                    setSelectedItem(value);
                    return this;
    }My ComboBox editor is public class ComboBoxEditor extends DefaultCellEditor {
            public ComboBoxEditor(String[] items) {
                   super(new JComboBox(items));
    }so i am using this render and editor in my swing screen by the following codeString strSP[] = {"P", "O", "H", " "};
    column5.setCellEditor(new ComboBoxEditor(strSP));
    column5.setCellRenderer(new ComboBoxRenderer(strSP));I am sure like the problem with my renderer and editoronly,but i am helpless.
    Please if someone help me to come out of this problem,it will be much helpful for me .
    thanks

    Hi,
    Thanks for u'r reply
    I tried in so many ways.
    I tried with u'r editor,and sun forum examples also.
    I brief what i want.
    I am having table with 3 column.
    The zeroth col, and the 2 col is a combo box.so i am rendering.
    when i choose a one from zeroth col combo Box ,the 2nd col ComboBox value has to change into YES
    when i choose a apart from one from zeroth col combo Box ,the 2nd col combo Box value has to change into NO.
    Here my Problem is
    When ever i am choosing the particular value from the 1st combo box,it is affecting the all the combobox values below(set of values,not all)..To solve that i kept the commented line in the renderer but it is creating the new problem.
    I am very seriously working to solve this problem,if any one suggest to solve this,it will be very much helpful to me.
    I am posting my code belowimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    public class TableComboBox extends JFrame implements TableModelListener
         public JTable table;
            DefaultTableModel model = null;
            JComboBox editor2 = null;
         public TableComboBox()
              Object[][] data = { {" ", "A" , " "}, {" ", "B", " "}, {" ", "C", " "}, {" ", "D", " "}, {" ", "E", " "}, {" ", "F", " "}, {" ", "G", " "}, {" ", "H", " "}  };
                    String[] columnNames = {"FIRST","SECOND", "THIRD" };
                    String[] column0Items = { "one", "two", "three", "four" };
                    String column2Items[] = {"YES","NO"};
              model = new DefaultTableModel(data, columnNames);
                    model.addTableModelListener(this);
              table = new JTable(model);
              //  Set the Zeroth column to use a combobox as its editor,renderer
                    table.getColumnModel().getColumn(0).setCellRenderer(new ComboBoxRenderer(column0Items));
              table.getColumnModel().getColumn(0).setCellEditor(new ComboBoxEditor(column0Items));
                    //  Set the second column to use a combobox as its editor,renderer
                    table.getColumnModel().getColumn(2).setCellRenderer(new ComboBoxRenderer(column2Items));
              table.getColumnModel().getColumn(2).setCellEditor(new ComboBoxEditor(column2Items));
                    JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
             public void tableChanged(TableModelEvent e) {
                    int row = e.getFirstRow();
                    int column = e.getColumn();
                    if(e.getType() == TableModelEvent.INSERT) {
                    if (e.getType() == TableModelEvent.UPDATE) {
                            if(table.getEditingRow() != table.getSelectedRow())
                                    ((DefaultCellEditor)table.getCellEditor()).cancelCellEditing();                      
                   if ( column == 0 ) {
                                    if(model.getValueAt(row, 0).equals("one")) {
                                            model.setValueAt("YES", row, 2);
                                    } else if(model.getValueAt(row, 0).equals("two")){
                                            model.setValueAt("NO", row, 2);
                                    } else if(model.getValueAt(row, 0) == "three"){
                                            model.setValueAt("NO", row, 2);
                                    } else if(model.getValueAt(row, 0) == "four"){
                                            model.setValueAt("NO", row, 2);
                           }else{
                                    //do nothing
         public static void main(String[] args)
              final TableComboBox frame = new TableComboBox();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
            class ComboBoxRenderer extends JComboBox implements TableCellRenderer {
                    String items[];
                    public ComboBoxRenderer(String[] items) {
                                    super(items);
                                    this.items = items;
                    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                                   if(isSelected){
                                            setSelectedItem(value.toString());
                                            return this;
                                    }/*else{
                                            setSelectedItem(items[0]));
                            return this;
            class ComboBoxEditor extends DefaultCellEditor {
                    public ComboBoxEditor(String[] items) {
                           super(new JComboBox(items));
            }

  • 2007A - Problem with Combobox.Selected with an empty value

    Hi all,
    I 've tried to launch my add-on created with SBO 2005 SP1
    on 2007 client.
    I've a problem when I try to do
    myCombobox.Selected.Value
    when the valid value is empty.
    Selected is null and I've an error.
    So I must test each Combobox by doing this :
    if( myCombobox.Selected is null)
    But I've hundreds of this case in my code.
    Does an another solution exists?
    Thanks

    you have the same problem in every business one version.
    you first have to check if the property is not null/nothing
    the only other way is that you use try / catch
    value = oform.Items.Item("cmb1").Specific.selected.value()
    Catch ex As Exception
       value = ""
    End Try
    but the effort is the same for you

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

  • Performance problems with combobox and datasource

    We have a perfomance problem, when we are connecting a datatable object or something like this to a datasource property of a combobox. Below you find the source code. The SQL-Statement reads about 40000 rows and the result (all 40000) should be listed in the combobox. There is duration about 30 second before this process has finished. Any suggestions?
    Dim ds As New DataSet
    strSQL = "Select * from am.city"
    conn = New Oracle.DataAccess.Client.OracleConnection(Configuration.ConfigurationSettings.AppSettings("conORA"))
    comm = New Oracle.DataAccess.Client.OracleCommand(strSQL)
    da = New Oracle.DataAccess.Client.OracleDataAdapter(strSQL, conn)
    conn.Open()
    da.Fill(ds)
    conn.Close()
    Dim dt As New DataTable
    dt = ds.Tables(0)
    ComboBox1.DataSource = dt
    ComboBox1.ValueMember = dv.Table.Columns("id").ColumnName
    ComboBox1.DisplayMember = dv.Table.Columns("city").ColumnName

    But how long does it take to fill the DataTable?
    I can fill a 40000 row datatable in under 4 seconds.
    DataBinding a combo box to that many rows is pretty expensive, and not normally recommended.
    David
    Dim strConnection As String = "Data Source=oracle;User ID=scott;Password=tiger;"
    Dim conn As OracleConnection = New OracleConnection(strConnection)
    conn.Open()
    Dim cmd As New OracleCommand("select * from (select * from all_objects union all select * from all_objects) where rownum <= 40000", conn)
    Dim ds As New DataSet()
    Dim da As New OracleDataAdapter(cmd)
    Dim begin As Date = Now
    da.Fill(ds)
    Console.WriteLine(ds.Tables(0).Rows.Count & " rows loaded in " & Now.Subtract(begin).TotalSeconds & " seconds")
    outputs
    40000 rows loaded in 3.734375 seconds

  • Problem with combobox

    I have a panel in table view. One of the fields, I have changed to a combo box. It works good except for one problem. When testing, I set the text in the field using the combo box. If I go directly to another record, in the same column, when i change that record, the one i had changed in the previous record changes also. It's like it has never lost focus of the previous record. I can click in another field in the previous record before going to the new record and it works OK. Any suggestions???
    Thanks, William

    Look in the API under combobox, there are 2 constructors there that may interest you--one for an array and another for a vector. Make your return object of either of those and you'll be fine.He's been told to use an array as the parameter several times, all to no avail. I'm beginning to lose hope for this one.Ok I'm sorry I've not got it yet but I just don't understand. Let me try again.
    I have a method in my other class
    private ArrayList< String > Quizbook= new ArrayList< String >(); // at the top of the program declaring it.
    public ArrayList getwhole() // the method to return it
    return Quizbook;
    }So that method returns the Quizbook which is an Array? am I right so far?
    Then in my other class I have
    JComboBox Answer = new JComboBox(Vector (Q.getwhole));Q is an object in that previous class and '.getwhole' bieng the above method. that returns the array Quizbook. so surely I am using the array as the parameter?
    And then I looked up the api and it says:
    JComboBox
    public JComboBox(Vector items)
    Creates a JComboBox that contains the elements in the specified Vector. By default the first item in the vector and therefore the data model) becomes selected.
    Parameters:
    items - an array of vectors to insert into the combo box
    See Also:
    DefaultComboBoxModel
    so if items is the parameter that you are saying should be an array then how come it isn't in the way I'm doing it the method I'm telling it to call getwhole which returns the array??
    I know its probaly very tedious repeating things but It would help me alot if you could just go over it again explaining exactly where I'm going wrong.

  • Problem with combobox.select method in 2007A

    Hi,
    When I'm trying to select the empty validvalue with a combo in SBO 2007 A, I've the error "Out of Range"
    myCombo.Select( 0, BoSearchKey.psk_Index);
    However I'm sure that the item 0 of my ValidValues is blank.
    I tried to do the same thing by value or description and it's the same problem.
    Can anyone help me ?
    Thanks
    (I'm using 2005 version of SAPboui/bobsCom.dll)

    Hi Julien,
    i tried it as
    oComboBox.ValidValues.Add("1", "Combo Value 1")
            oComboBox.ValidValues.Add("", "") - as you wrote
            oComboBox.ValidValues.Add("2", "Combo Value 2")
            oComboBox.ValidValues.Add("3", "Combo Value 3")
            oComboBox.Select("", SAPbouiCOM.BoSearchKey.psk_ByValue)
            oComboBox.Select(1, SAPbouiCOM.BoSearchKey.psk_Index)
    and both select method work. Are you sure that you have added this blank value?
    Try to debug it as
            Dim q As Integer
            Dim s As String
            For q = 0 To oComboBox.ValidValues.Count - 1
                s = oComboBox.ValidValues.Item(q).Value
            Next
    maybe it helps you.
    Petr

  • [Solved]probleme with combobox

    hi,
    i create a frame using ADF BC in which i drag and drop the departmentVO and i set it a combobox.
    in my database i have 60 department, when i open the combobox i fond only 10 departments and i want to find it all in the combobox.
    can any body help me.
    thanks
    Message was edited by:
    7rouz

    Hi 7rouz,
    Go into your pageDef, find the iterator on which your list is based, then change the "rangeSize" option to -1 (which means "get all entries", i assume it is set to 10 for the moment and so displays only 10 entries)
    Hope that works,
    Regards,
    Tif

  • Problem with a matrix of string

    When i use the programm after executing progect,during the operation when go to inseert the value of array in the matrix, that compose the Jtable, return me this errors.
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 7
    at Invio_cli.vis_c(Invio_cli.java:166)
    at main.main(main.java:43)
    import java.net.*;
    import java.sql.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Invio_cli extends JFrame{
              private int num_rig=0;
              private int num_col=0;
              private int i,j,z;
              private int lung=0;
              private String[] splitta=null;
              private String      cells_s=new String();
              private String columnNum= new String();
              private String numriche=new String();
              private String column_name;
              private String[] split_temp2=null;
              private String[] columnName;
              private String[][] cells;     
              private String risp;
              private String send_data= new String();
              private String temp;
         public void vis_c(Socket s)
              JScrollPane scrollp;
              j=0;
              Socket s_v= s;
              conn_i_c connez= new conn_i_c();
              send_data="220";
              i=connez.send(send_data,s_v);
              risp=connez.readResponse(s_v);
              splitta=risp.split("\\�");
              columnNum=splitta[0];
              column_name=splitta[1];
              numriche=splitta[2];
                   cells_s=splitta[3];
              num_rig=Integer.parseInt(numriche);
              //System.out.println(numriche);
              num_col=Integer.parseInt(columnNum);
              System.out.println(columnNum);
              columnName =column_name.split("\\�");
              cells = new String[num_rig][num_col];
              int counter =0;
              j=0;
              split_temp2=cells_s.split("\\�");
              lung=split_temp2.length;
              System.out.println(lung);
              System.out.println(split_temp2[7]);
                   for(i=0;i<num_rig;i++)
                        for(z=0;z<num_col;z++)
    //THIS IS ROW 166          
         cells[i][z]=split_temp2[z];
                             j++;
                        num_col=num_col+num_col;
              JTable table = new JTable(cells,columnName);
              scrollp = new JScrollPane();
                   //senza il viewport non si vede nulla!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                   scrollp.getViewport().add(table);     
              //CERO IL FRAME CHE CONTERRA IL JPANNEL E JTABLE
                   setSize(800,500);
                   //aggiungo il jscroll con tabella al frame
                   getContentPane().add(scrollp);
                   setVisible(true);
         public void close_c(Socket s){
              Socket sc_s=new Socket();
              conn_i_c conne= new conn_i_c();
              conne.close_c(sc_s);
    WHY????????
    PLEASE HELP ME THANKS!!!!!
    P.S. Sorry for my eng.

    agreed about the code tags....
    but...
    cells = new String[num_rig][num_col];
    for(i=0;i<num_rig;i++) {
       for(z=0;z<num_col;z++) {
         //THIS IS ROW 166
         cells[z]=split_temp2[z];
         j++;
       num_col=num_col+num_col;
    }why are you adding num_col to itself? The number of columns is not changing, and this is causing z to go beyond what you've already set the cells array size to be. Arrays in Java will not grow or shrink after declaring them. If you want a larger array, you need to create a new array and then copy everything to the new array (System.arraycopy).

  • Problems with my matrix...

    Hi,
    I get this error when I try to run through this part of my code:
    "java.lang.NullPointerException"
    What am I doing wrong?
        int counter1=0, counter2=0, sum=0;
        Double temp1, temp2, result;
        Double[] Array1, Array2;
        Double[][] newMatrix, dmatrix;
                while(counter1 < dmatrix.length) {
                for(int i = 0; i < dmatrix[counter1].length; i++) {
                    Array1[i] = dmatrix[counter1]; // <--I believe the errors are here? But it could be due to something else
    System.out.println(Array1[i]);
    counter2 = counter1 + 1;
    while(counter2 < dmatrix.length) {
    for(int j = 0; j < dmatrix[counter2].length; j++) {
    Array2[j] = dmatrix[counter2][j]; // <--I believe the errors are here? But it could be due to something else
    for(int k = 0; k < Array2.length; k++) {
    temp1 = Array1[k];
    temp2 = Array2[k];
    if(temp1.compareTo(temp2) < 0) {
    result = new Double (result.doubleValue() + ( temp1.doubleValue()/temp2.doubleValue() ) );
    else if(temp1.compareTo(temp2) > 0) {
    result = new Double (result.doubleValue() + ( temp2.doubleValue()/temp1.doubleValue() ) );
    sum++;
    System.out.println(result);
    counter1++;
    sum = 0;

    Double[] Array1, Array2;
    Double[][] newMatrix, dmatrix;Wrong. You haven't allocated any memory. Where's the call to new? All you've done is declare variables of a given type.
    You need to do something more like this:
    public class MatrixTester
        public static void main(String [] args)
            int numRows = 5;
            int numCols = 5;
            double [][] matrix = new double[numRows][];
            for (int m = 0; m < numRows; ++m)
                matrix[m] = new double[numCols];
                for (int n = 0; n < numCols; ++n)
                    matrix[m][n] = (double)(m + n);
            for (int m = 0; m < numRows; ++m)
                for (int n = 0; n < numCols; ++n)
                    System.out.print(matrix[m][n] + " ");
                System.out.println();
    }Note the calls to "new".

  • Problem with Matrix/Checkbox/Datasource

    Hi, i have a problem with a Matrix.
    There are 3 Columns on this Matrix, one of those is a Checkbox. I fill the Columns with data, the Checkboxes where just added (no Checkbox is selected), the user has to select the value (Checkbox)he want's to by hand.
    After i filled the Matrix i can see all the data on the Form, it's OK, but then i loose all entries after SBO is doing some work. There where shown only the empty rows and the checkboxes.
    I guess it has something to do with the databinding. My problem is that i don't have the Data for this form on a db-table. I fill in the matrix the result of some querys. It looks like i need at least a DB-Field for the checkboxes, otherwise there are not working (not selectable)
    Somebody knows a solution how i can keep the Data in the Matrix after SBO is doing some work? What could be the reason that i loose the data after filling it in the Matrix? Is there an easy way?
    Thanks Andreas

    Almost every item on a form need a datasource... If the item reprecents some data in a table the databinding must be a dbds... If the data does not reflect any data in a table (Calulated value, user-decision, ect.) a userdatasource need to be created...
    Add a userdatasource
    oForm.DataSources.UserDataSources.Add(UID,type,length);
    Databind to DBDS
    col.DataBind.SetBound(true,”TABLE”,”FIELD”);
    Databind to UDS
    col.DataBind.SetBound(true,””,UID);

Maybe you are looking for