Hello,

when adding first a Table and then a PickList to a FieldSet (using 2.3.0-M1) I'm getting a

java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.ArrayList.elementData(ArrayList.java:338)
    at java.util.ArrayList.set(ArrayList.java:366)
    at org.apache.click.control.FieldSet.replace(FieldSet.java:276)
    at org.apache.click.control.FieldSet.insert(FieldSet.java:213)
    at org.apache.click.control.FieldSet.add(FieldSet.java:328)
    at org.apache.click.control.FieldSet.add(FieldSet.java:352)

Adding the PickList first and then the Table doesn't throw an exception, but then the PickList will not be rendered.

Code is similar to this (of course, in the real code the controls a populated with DataProvider etc.):

public class Test extends Page {

    protected Table testTable = new Table("Test Table");
    protected PickList testPickList = new PickList("Test Pick List);

    public Test() {

        super();

        FieldSet fields = new FieldSet("test");
        testTable.setClass(Table.CLASS_SIMPLE);
        testTable.addColumn(new Column("Test Column"));
        fields.add(testTable);
        fields.add(testPickList);

    [...]

    }

[...]

}

Maybe its not supported?

I can work around this, so just a minor issue here.

Axel

Reply via email to