PDA

View Full Version : BasePagingLoader using BeanModelReader fails on Bean with List member?



aconn7
7 Jul 2009, 11:05 AM
I have copied the Paging BeanModel Grid example from the GXT 2.0 Explorer and incorporated it using my own "FormDefinitionTest" bean. The example works fine except when my bean is modified to include a List<C> member.

When the List<C> member is added, the BeanModelReader.ListLoadResult method is never called and the message "Loading ..." never goes away.

Are Bean members restricted from being collections? This bean works in other cases and including BeanModelFactory.createFactory.

Here is the class WITH the List<C> collection:



public class FormDefinitionTest implements Serializable {

private String name;
private String heading;
private Date effectiveDate;
private int width=400;
private int height;
private int fieldWidth=270;
private List<FieldDefinition> fieldList = new ArrayList<FieldDefinition>();

public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getHeading() {
return heading;
}
public void setHeading(String heading) {
this.heading = heading;
}
public Date getEffectiveDate() {
return effectiveDate;
}
public void setEffectiveDate(Date effectiveDate) {
this.effectiveDate = effectiveDate;
}

public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public int getFieldWidth() {
return fieldWidth;
}
public void setFieldWidth(int fieldWidth) {
this.fieldWidth = fieldWidth;
}
public List<FieldDefinition> getFieldList() {
return fieldList;
}
public void setFieldList(List<FieldDefinition> fieldList) {
this.fieldList = fieldList;
}


}

aconn7
8 Jul 2009, 4:51 AM
This turned out to be the problem. The RPC call never completed because of the "Bag" collection that hibernate uses to wrap collections.

The funny thing is, I never got any error messages to this effect on the hosted console. Only "500 - Post Error". However, while testing different scenarios, the actual RPC error randomly came up.

Does anybody know how I can get more descriptive error messages from the hosted console more reliably?