本文整理汇总了Java中com.extjs.gxt.ui.client.data.PagingLoadResult类的典型用法代码示例。如果您正苦于以下问题:Java PagingLoadResult类的具体用法?Java PagingLoadResult怎么用?Java PagingLoadResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PagingLoadResult类属于com.extjs.gxt.ui.client.data包,在下文中一共展示了PagingLoadResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeWorkspaces
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
/**
* @param gsInstance
*/
private void initializeWorkspaces(
final GSInstanceModel gsInstance) {
workspacesService.getWorkspaces(0, 0, (gsInstance != null) ? gsInstance.getBaseURL() : null, gsInstance,
new AsyncCallback<PagingLoadResult<WorkspaceModel>>() {
public void onFailure(Throwable caught) {
workspaces.removeAll();
}
public void onSuccess(PagingLoadResult<WorkspaceModel> result) {
workspaces.removeAll();
workspaces.add(result.getData());
initializeLayers(gsInstance, model.getWorkspace(), model.getService());
}
});
}
示例2: initializeLayers
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
/**
* @param gsInstance
* @param workspace
* @param service
*/
private void initializeLayers(
final GSInstanceModel gsInstance,
final String workspace, final String service) {
workspacesService.getLayers(0, 0, (gsInstance != null) ? gsInstance.getBaseURL() : null, gsInstance, workspace, service,
new AsyncCallback<PagingLoadResult<Layer>>() {
public void onFailure(Throwable caught) {
layers.removeAll();
}
public void onSuccess(PagingLoadResult<Layer> result) {
layers.removeAll();
layers.add(result.getData());
}
});
}
示例3: getAvailableProfiles
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
/**
* Gets the available profiles.
*
* @return the available profiles
*/
private ListStore<UserGroupModel> getAvailableProfiles()
{
ListStore<UserGroupModel> availableProfiles = new ListStore<UserGroupModel>();
RpcProxy<PagingLoadResult<UserGroupModel>> profileProxy = new RpcProxy<PagingLoadResult<UserGroupModel>>()
{
@Override
protected void load(Object loadConfig, AsyncCallback<PagingLoadResult<UserGroupModel>> callback)
{
profilesManagerServiceRemote.getProfiles(
((PagingLoadConfig) loadConfig).getOffset(), ((PagingLoadConfig) loadConfig).getLimit(),
false, callback);
}
};
BasePagingLoader<PagingLoadResult<ModelData>> profilesLoader =
new BasePagingLoader<PagingLoadResult<ModelData>>(
profileProxy);
profilesLoader.setRemoteSort(false);
availableProfiles = new ListStore<UserGroupModel>(profilesLoader);
return availableProfiles;
}
示例4: createStore
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public void createStore()
{
// /////////////////////////////
// Loader for rulesService
// /////////////////////////////
this.proxy = new RpcProxy<PagingLoadResult<UserGroupModel>>()
{
@Override
protected void load(Object loadConfig, AsyncCallback<PagingLoadResult<UserGroupModel>> callback)
{
profilesService.getProfiles(-1,-1,false, callback);
}
};
loader = new BaseListLoader<ListLoadResult<ModelData>>(proxy);
loader.setRemoteSort(false);
store = new ListStore<UserGroupModel>(loader);
store.sort(BeanKeyValue.STYLES_COMBO.getValue(), SortDir.ASC);
setUpLoadListener();
}
示例5: findGroups
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public PagingLoadResult<GroupModel> findGroups(String filter, Integer offset, Integer limit) {
Integer count = soFinder.countGroup(filter);
List<GroupModel> models = new ArrayList<GroupModel>();
try {
List<CfGroup> list = soFinder.findGroups(filter, offset, limit);
for (CfGroup group : list) {
GroupModel model = new GroupModel();
BeanUtils.copyProperties(group, model);
models.add(model);
}
} catch (Exception e) {
log.error("error occurred", e);
}
return new BasePagingLoadResult<GroupModel>(models, offset, count);
}
示例6: getLoader
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
public BasePagingLoader<PagingLoadResult<BeanObject>> getLoader(final String model, final Criteria criteria, final Map<String,List<String>> wantedFields) {
if (model == null) {
throw new RuntimeException("model = null");
}
final IShopServiceAsync service = getService();
MyRpcProxy<PagingLoadResult<BeanObject>> proxy = new MyRpcProxy<PagingLoadResult<BeanObject>>() {
public void load(Object loadConfig, AsyncCallback callback) {
service.getPagingList(model, criteria, wantedFields == null ? null : wantedFields.get(model), (PagingLoadConfig) loadConfig, callback);
}
};
proxy.setCriteria(criteria);
// loader
BasePagingLoader<PagingLoadResult<BeanObject>> loader = new BasePagingLoader<PagingLoadResult<BeanObject>>(proxy);
loader.setRemoteSort(true);
return loader;
}
示例7: createStore
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public void createStore()
{
toolBar = new PagingToolBar(org.geoserver.geofence.gui.client.Constants.DEFAULT_PAGESIZE);
this.proxy = new RpcProxy<PagingLoadResult<UserModel>>()
{
@Override
protected void load(Object loadConfig, AsyncCallback<PagingLoadResult<UserModel>> callback)
{
// TODO REFACTOR GG
// service.loadUsers((PagingLoadConfig) loadConfig, searchText,
// callback);
}
};
loader = new BasePagingLoader<PagingLoadResult<ModelData>>(proxy);
loader.setRemoteSort(false);
store = new ListStore<UserModel>(loader);
this.toolBar.bind(loader);
// toolBar.disable();
setUpLoadListener();
}
示例8: getWorkspaces
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
public PagingLoadResult<WorkspaceModel> getWorkspaces(int offset, int limit, String remoteURL,
GSInstanceModel gsInstance) throws ApplicationException
{
List<WorkspaceModel> workspacesListDTO = new ArrayList<WorkspaceModel>();
workspacesListDTO.add(new WorkspaceModel("*"));
if ((remoteURL != null) && !remoteURL.equals("*") && !remoteURL.contains("?"))
{
try
{
GeoServerRESTReader gsreader = new GeoServerRESTReader(remoteURL, gsInstance.getUsername(), gsInstance.getPassword());
RESTWorkspaceList workspaces = gsreader.getWorkspaces();
if ((workspaces != null) && !workspaces.isEmpty())
{
Iterator<RESTShortWorkspace> wkIT = workspaces.iterator();
while (wkIT.hasNext())
{
RESTShortWorkspace workspace = wkIT.next();
workspacesListDTO.add(new WorkspaceModel(workspace.getName()));
}
}
}
catch (MalformedURLException e)
{
logger.error(e.getLocalizedMessage(), e);
throw new ApplicationException(e.getLocalizedMessage(), e);
}
}
return new RpcPageLoadResult<WorkspaceModel>(workspacesListDTO, 0, workspacesListDTO.size());
}
示例9: load
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public void load(DataReader<PagingLoadResult<DashboardContact>> reader, Object loadConfig, AsyncCallback<PagingLoadResult<DashboardContact>> callback) {
FilterPagingLoadConfig config = (FilterPagingLoadConfig)loadConfig;
List<DashboardContact> results;
int totalLength = 0;
int offset = config.getOffset();
if (ClientUtils.isEmpty(allContacts)) {
results = Collections.emptyList();
} else {
sortContacts(config.getSortInfo());
List<DashboardContact> filteredList = filterContacts(config.getFilterConfigs());
totalLength = filteredList.size();
if (offset > totalLength) {
offset = 0;
}
int limit = offset + config.getLimit();
if (limit >= totalLength) {
limit = totalLength;
}
results = filteredList.subList(offset, limit);
}
callback.onSuccess(new BasePagingLoadResult<DashboardContact>(results, offset, totalLength));
}
示例10: findModules
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public PagingLoadResult<ModuleModel> findModules(Integer offset, Integer limit) {
Integer count = amFinder.countModule();
List<ModuleModel> models = new ArrayList<ModuleModel>();
try {
List<CfModule> modules = amFinder.findModules(offset, limit);
for (CfModule module : modules) {
models.add(amConverter.convert(module));
}
} catch (Exception e) {
log.error("error occurred", e);
}
return new BasePagingLoadResult<ModuleModel>(models, offset, count);
}
示例11: convertToPagingUnitCodes
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
public PagingLoadResult<UnitCodeModel> convertToPagingUnitCodes(List<CfUnitCode> unitCodes, Integer count, Integer offset) {
List<UnitCodeModel> models = new ArrayList<UnitCodeModel>();
for (CfUnitCode unitCode : unitCodes) {
models.add(convert(unitCode));
}
return new BasePagingLoadResult<UnitCodeModel>(models, offset, count);
}
示例12: findAccountCodes
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public PagingLoadResult<AccountCodeModel> findAccountCodes(Integer offset, Integer limit) {
return ddConverter.convertToPagingAccountCodes(
ddFinder.findAccountCodes(offset, limit),
ddFinder.countAccountCode(),
offset);
}
示例13: findUnitCodes
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public PagingLoadResult<UnitCodeModel> findUnitCodes(Integer offset, Integer limit) {
return ddConverter.convertToPagingUnitCodes(
ddFinder.findUnitCodes(offset, limit),
ddFinder.countUnitCode(),
offset);
}
示例14: findUsers
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public PagingLoadResult<UserModel> findUsers(String filter, Integer offset, Integer limit) {
Integer count = soFinder.countUser(filter);
List<UserModel> models = new ArrayList<UserModel>();
try {
List<CfUser> list = soFinder.findUsers(filter, offset, limit);
for (CfUser user : list) {
models.add(soConverter.convert(user));
}
} catch (Exception e) {
log.error("error occurred", e);
}
return new BasePagingLoadResult<UserModel>(models, offset, count);
}
示例15: findGroups
import com.extjs.gxt.ui.client.data.PagingLoadResult; //导入依赖的package包/类
@Override
public PagingLoadResult<GroupModel> findGroups(String filter, Integer offset, Integer limit) {
Integer count = soFinder.countGroup(filter);
List<GroupModel> models = new ArrayList<GroupModel>();
try {
List<CfGroup> groups = soFinder.findGroups(filter, offset, limit);
for (CfGroup group : groups) {
models.add(soConverter.convert(group));
}
} catch (Exception e) {
log.error("error occurred", e);
}
return new BasePagingLoadResult<GroupModel>(models, offset, count);
}