PDA

View Full Version : Problem vertical scrollbar grid gxt 3.1.1



baczek00
30 Sep 2014, 2:51 AM
Hello,

I have a problem with scrolling grid in a vertical position.

Grid has more than 100 records what you see on the attached file.

loading in this way from the database



public LoaderDataResult execute(LoaderData action, ExecutionContext context) throws ActionException {
List<BaseModelData> record = null;
if (action.getListConfig() != null) {
try {
record = LoaderDataLive(action.getCommitAfterTransaction(), action.getAction(), action.getSQL());
} catch (JSQLParserException ex) {
Logger.getLogger(LoaderDataHandler.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(LoaderDataHandler.class.getName()).log(Level.SEVERE, null, ex);
}
return new LoaderDataResult(new ListLoadResultBean<BaseModelData>(record));
} else {
try {
if (action.getNameClass() != null && action.getNameGrid() != null) {
record = LoaderDataLive(action.getCommitAfterTransaction(), action.getAction(), action.getNameClass(), action.getSQL(), action.getNameClass());
} else {
record = LoaderDataLive(action.getCommitAfterTransaction(), action.getAction(), action.getSQL());
}
} catch (JSQLParserException ex) {
Logger.getLogger(LoaderDataHandler.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(LoaderDataHandler.class.getName()).log(Level.SEVERE, null, ex);
}
return new LoaderDataResult(new PagingLoadResultBean<BaseModelData>(record, action.getPagingtConfig().getOffset(), record.size()));
}


Why The vertical bar is turned off?

baczek00
30 Sep 2014, 1:04 PM
The problem is in this line:



return new LoaderDataResult(new PagingLoadResultBean<BaseModelData>(record, action.getPagingtConfig().getOffset(), record.size()));


The correct line:



return new LoaderDataResult(new PagingLoadResultBean<BaseModelData>(record, record.size(), action.getPagingtConfig().getOffset()));