0

GXT JsonReader without model type fields

In GXT, to convert JSON to ModelData we need to declare the model type fields for each variable to be converted into model data. As the data changed, you need to change the model type fields or you will get the null pointer exception. So I want to create a JSON reader that can read json string and convert to model data without need specify the fields.

To do that I need to create a custom JsonReader, JsonPagingLoadResultReader and JsonLoadResultReader.

They can be downloaded here :

MyJsonReader.java

MyJsonPagingLoadResultReader.java
MyJsonLoadResultReader.java
0

Change background color in GXT grid column

column.setRenderer(new GridCellRenderer() {
public String render(Stock model, String property, ColumnData config, int rowIndex,
int colIndex, ListStore store) {
config.style = "background-color: silver;";
return model.get(property);
}
});


Source:http://www.sencha.com/forum/showthread.php?49510-Change-background-color-in-GXT-grid-column
 
Copyright © peyotest