本文整理汇总了Java中com.extjs.gxt.ui.client.data.BaseListLoader类的典型用法代码示例。如果您正苦于以下问题:Java BaseListLoader类的具体用法?Java BaseListLoader怎么用?Java BaseListLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseListLoader类属于com.extjs.gxt.ui.client.data包,在下文中一共展示了BaseListLoader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createStore
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
@Override
public void createStore() {
// /////////////////////////////
// Loader for rulesService
// /////////////////////////////
this.proxy = new RpcProxy<List<LayerStyle>>() {
@Override
protected void load(Object loadConfig,
AsyncCallback<List<LayerStyle>> callback) {
workspacesService.getStyles(theRule, callback);
}
};
loader = new BaseListLoader<ListLoadResult<ModelData>>(proxy);
loader.setRemoteSort(false);
store = new ListStore<LayerStyle>(loader);
store.sort(BeanKeyValue.STYLES_COMBO.getValue(), SortDir.ASC);
setUpLoadListener();
}
示例2: createStore
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的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();
}
示例3: getAvailableStyles
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
/**
* Gets the available styles.
*
* @param rule
* the rule
* @return the available styles
*/
private ListStore<LayerStyle> getAvailableStyles(final RuleModel rule)
{
RpcProxy<List<LayerStyle>> workspacesProxy = new RpcProxy<List<LayerStyle>>()
{
@Override
protected void load(Object loadConfig, AsyncCallback<List<LayerStyle>> callback)
{
workspacesService.getStyles(rule, callback);
}
};
BaseListLoader<ListLoadResult<ModelData>> workspacesLoader = new BaseListLoader<ListLoadResult<ModelData>>(
workspacesProxy);
workspacesLoader.setRemoteSort(false);
ListStore<LayerStyle> geoserverStyles = new ListStore<LayerStyle>(workspacesLoader);
return geoserverStyles;
}
示例4: getProjectManagerStore
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private ListStore<BeanModel> getProjectManagerStore(){
RpcProxy<List<UserDTO>> UserProxy = new RpcProxy<List<UserDTO>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<UserDTO>> callback) {
userService.getUsersByRole("pm",callback);
}
};
userloader = new BaseListLoader<ListLoadResult<ModelData>>(UserProxy,new BeanModelReader());
final ListStore<BeanModel> userStore = new ListStore<BeanModel>(userloader);
userStore.setMonitorChanges(true);
userloader.load();
return userStore;
}
示例5: populateAuthmethodGrid
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private void populateAuthmethodGrid(){
RpcProxy<List<AuthmethodDTO>> authMethodProxy = new RpcProxy<List<AuthmethodDTO>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<AuthmethodDTO>> callback) {
authService.getAuthMethods(callback);
}
};
loader = new BaseListLoader<ListLoadResult<ModelData>>(authMethodProxy,new BeanModelReader());
authMethodStore = new ListStore<BeanModel>(loader);
authMethodStore.setMonitorChanges(true);
loader.load();
}
示例6: getLoader
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
public BaseListLoader getLoader(final String model, final Criteria criteria, final List<String> wantedFields) {
if (model == null) {
throw new RuntimeException("model = null");
}
final IShopServiceAsync service = getService();
MyProxy proxy = new MyProxy() {
public void load(Object loadConfig, AsyncCallback callback) {
service.getList(model, criteria, wantedFields, callback);
}
};
proxy.setCriteria(criteria);
// loader
BaseListLoader loader = new BaseListLoader(proxy);
// loader.setRemoteSort(true);
return loader;
}
示例7: IndicatorFilterCombo
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
public IndicatorFilterCombo(DispatchAsync dispatcher) {
super();
this.dispatcher = dispatcher;
this.loader = new BaseListLoader<ListLoadResult<ModelData>>(new IndicatorProxy());
setStore(new ListStore(loader));
setDisplayField("name");
setWidth(150);
setMinListWidth(400);
}
示例8: SiteFilterCombo
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
public SiteFilterCombo(DispatchAsync dispatcher) {
super();
this.dispatcher = dispatcher;
this.loader = new BaseListLoader<ListLoadResult<ModelData>>(new SiteProxy());
setStore(new ListStore(loader));
setDisplayField("locationName");
}
示例9: load
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private ListStore<BeanModel> load(){
RpcProxy<List<BranchDTO>> proxy = new RpcProxy<List<BranchDTO>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<BranchDTO>> callback) {
branchService.getBranchListForCombo(true,addAllValue, callback);
}
};
loader = new BaseListLoader<ListLoadResult<ModelData>>(proxy,new BeanModelReader());
branchStore = new ListStore<BeanModel>(loader);
branchStore.setMonitorChanges(true);
loader.load();
return branchStore;
}
示例10: createImportSourceStore
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private ListStore<BeanModel> createImportSourceStore(){
RpcProxy<List<AuthmethodDTO>> authmetodProxy = new RpcProxy<List<AuthmethodDTO>>(){
@Override protected void load(Object loadConfig, AsyncCallback<List<AuthmethodDTO>> callback) {
authmethodService.getImportSources(callback);
}
};
authmethodloader = new BaseListLoader<ListLoadResult<ModelData>>(authmetodProxy,new BeanModelReader());
exportSourceStore = new ListStore<BeanModel>(authmethodloader);
exportSourceStore.setMonitorChanges(true);
authmethodloader.load();
return exportSourceStore;
}
示例11: loadGrid
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private void loadGrid(){
RpcProxy<List<BranchDTO>> proxy = new RpcProxy<List<BranchDTO>>() {
@Override protected void load(Object loadConfig, AsyncCallback<List<BranchDTO>> callback) {
branchService.getBranchList(status,callback);
}
};
loader = new BaseListLoader<ListLoadResult<BeanModel>>(proxy,new BeanModelReader());
store = new ListStore<BeanModel>(loader);
store.setMonitorChanges(true);
loader.load();
}
示例12: loadOwnerStore
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private ListStore<BeanModel> loadOwnerStore(){
RpcProxy<List<UserDTO>> UserProxy = new RpcProxy<List<UserDTO>>() {
@Override protected void load(Object loadConfig, AsyncCallback<List<UserDTO>> callback) {
userService.getUsersByRole("fd",callback);
}
};
userloader = new BaseListLoader<ListLoadResult<ModelData>>(UserProxy,new BeanModelReader());
final ListStore<BeanModel> userStore = new ListStore<BeanModel>(userloader);
userStore.setMonitorChanges(true);
userloader.load();
return userStore;
}
示例13: DepartmentFormGrid
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private Grid<BeanModel> DepartmentFormGrid(){
RpcProxy<List<DepartmentDTO>> proxy = new RpcProxy<List<DepartmentDTO>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<DepartmentDTO>> callback) {
departmentService.getDepartmentsByBranch("1",branch,callback);
}
};
ListLoader<?> loader = new BaseListLoader<ListLoadResult<ModelData>>(proxy,new BeanModelReader());
final ListStore<BeanModel> store = new ListStore<BeanModel>(loader);
store.setMonitorChanges(true);
loader.load();
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
columns.add(new ColumnConfig("name", myConstants.department(), 120));
columns.add(new ColumnConfig("owner.fullName",myConstants.owner(), 200));
ColumnModel cm = new ColumnModel(columns);
departmentGrid = new Grid<BeanModel>(store, cm);
departmentGrid.setLoadMask(true);
departmentGrid.setWidth(440);
departmentGrid.setHeight(500);
departmentGrid.addStyleName(".my-table-style");
departmentGrid.setBorders(true);
departmentGrid.setAutoExpandColumn("name");
departmentGrid.getView().setEmptyText("no data");
departmentGrid.setId("myDepartmentGridiD");
departmentGrid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
departmentGrid.getSelectionModel().addListener(Events.SelectionChange,
new Listener<SelectionChangedEvent<BeanModel>>() {
public void handleEvent(SelectionChangedEvent<BeanModel> be) {
departmentId = Integer.parseInt(departmentGrid.getSelectionModel().getSelectedItem().get("id").toString());
loadAssignmentTreeGrid();
}
});
return departmentGrid;
}
示例14: setup
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
protected void setup() {
// Setup Proxy..
RpcProxy<ListLoadConfig, ListLoadResult<AttributeModel>> proxy = new RpcProxy<ListLoadConfig, ListLoadResult<AttributeModel>>() {
@Override
protected void load(ListLoadConfig loadConfig,
AsyncCallback<ListLoadResult<AttributeModel>> callback) {
ArrayList<AttributeModel> list = new ArrayList<AttributeModel>();
ListLoadResult<AttributeModel> result = new BaseListLoadResult<AttributeModel>(list);
if (grid != null & currentRow >= 0) {
ModelData data = grid.getStore().getAt(currentRow);
if (data != null && config.getCIProperty() != null) {
Object obj = data.get(config.getCIProperty());
if (obj instanceof CIModel) {
CIModel ci = (CIModel)obj;
for (AttributeModel a : ci.getAttributes()) {
if ("simple".equals(config.getAttributeFilter())) {
if (!a.isComplex()) {
list.add(a);
}
} else if ("complex".equals(config.getAttributeFilter())) {
if (a.isComplex()) {
list.add(a);
}
} else {
list.add(a);
}
}
//list.addAll(ci.getAttributes());
}
}
}
callback.onSuccess(result);
}
};
BaseListLoader<ListLoadConfig, ListLoadResult<AttributeModel>> loader = new BaseListLoader<ListLoadConfig, ListLoadResult<AttributeModel>>(proxy);
ListStore<AttributeModel> store = new ListStore<AttributeModel>(loader);
setStore(store);
setDisplayField("alias");
}
示例15: doGrid
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private Grid<BeanModel> doGrid(){
RpcProxy<List<UserDTO>> UserProxy = new RpcProxy<List<UserDTO>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<UserDTO>> callback) {
userService.getUsersByBranch(usersRpcCriteria,selectedBranch,callback);
}
};
loader = new BaseListLoader<ListLoadResult<ModelData>>(UserProxy,new BeanModelReader());
final ListStore<BeanModel> UserStore = new ListStore<BeanModel>(loader);
UserStore.setMonitorChanges(true);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
columns.add(new ColumnConfig("login", "Login", 80));
columns.add(new ColumnConfig("fullName", "Name", 150));
columns.add(new ColumnConfig("status", "Status", 60));
columns.add(new ColumnConfig("department.name", "Department", 80));
ColumnModel cm = new ColumnModel(columns);
grid = new Grid<BeanModel>(UserStore, cm);
grid.setLoadMask(true);
grid.setWidth(380);
grid.setHeight(600);
grid.addStyleName(".my-table-style");
grid.setBorders(true);
grid.setAutoExpandColumn("login");
grid.getView().setEmptyText("no data");
grid.setId("myGridid");
grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
grid.getSelectionModel().addListener(Events.SelectionChange,new Listener<SelectionChangedEvent<BeanModel>>(){
@Override
public void handleEvent(SelectionChangedEvent<BeanModel> be) {
if (be.getSelection().size() > 0) {
userId = Integer.parseInt(grid.getSelectionModel().getSelectedItem().get("id").toString());
setExternalRateFieldValue();
}
}
});
return grid;
}