View Full Version : Integer errors on grids and grouping stores

15 Jan 2010, 1:11 AM
Hi all,

I have a problem with Integers on grids and groupingStores....

public class RestrictionModel extends BaseModel{

private static final long serialVersionUID = 1L;

public static final String ID = "id";
public static final String TYPE = "tipus";
public static final String DESCRIPTION = "descripcio";
public static final String ID_AGENDA = "id_agenda";

private AgendaModel agenda;
private ArrayList<RestrictionDateModel> dates;
private ArrayList<RestrictionDayModel> days;

public RestrictionModel(){}

public RestrictionModel(Integer id, String type, String description, AgendaModel agenda, ArrayList<RestrictionDateModel> dates, ArrayList<RestrictionDayModel> days){
this.agenda = agenda;
this.dates = dates;
this.days = days;
set(ID, id);
set(TYPE, type);
set(DESCRIPTION, description);
set(ID_AGENDA, agenda.getId());

When I try to group by ID_AGENDA (it's an Integer) on a grouping store or using it on a columnConfig I have the following error:

java.lang.ArrayIndexOutOfBoundsException: -1

The idea is to group by ID_AGENDA and use a renderer to print the agenda's name.

If I use a String field to groupBy or in a columnModel it gives no problems, only with Integers, even with ID.

15 Jan 2010, 10:40 AM
you have a full small working example in one class including EntryPoint of your problem. then it is easy to replay it.