本文整理汇总了Java中com.extjs.gxt.ui.client.data.BaseListLoader类的典型用法代码示例。如果您正苦于以下问题:Java BaseListLoader类的具体用法?Java BaseListLoader怎么用?Java BaseListLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseListLoader类属于com.extjs.gxt.ui.client.data包,在下文中一共展示了BaseListLoader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
开发者ID:geoserver,项目名称:geofence,代码行数:23,代码来源:RuleDetailsGridWidget.java
示例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();
}
开发者ID:geoserver,项目名称:geofence,代码行数:25,代码来源:ProfilesGridWidget.java
示例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;
}
开发者ID:geoserver,项目名称:geofence,代码行数:29,代码来源:RuleDetailsInfoWidget.java
示例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;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:18,代码来源:AssignmentTreeGrid.java
示例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();
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:18,代码来源:AuthPanel.java
示例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;
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:20,代码来源:ListService.java
示例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);
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:10,代码来源:IndicatorFilterCombo.java
示例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");
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:SiteFilterCombo.java
示例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;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:15,代码来源:BranchComboBox.java
示例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;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:15,代码来源:ImportUsersFromExternalStoreGrid.java
示例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();
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:14,代码来源:BranchPanel.java
示例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;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:14,代码来源:BranchPanel.java
示例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;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:41,代码来源:DepartmentReport.java
示例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");
}
开发者ID:luox12,项目名称:onecmdb,代码行数:46,代码来源:AttributeSelectorField.java
示例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;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:44,代码来源:ExternalRatePanel.java
示例16: doGrid
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private Grid<BaseModel> doGrid(){
RpcProxy<List<BaseModel>> proxy = new RpcProxy<List<BaseModel>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<BaseModel>> callback) {
Date startDate = start.getValue();
Date endDate = end.getValue();
statService.getHourReportByUserByPeriodByAssignmentByBranch(assignment,branch,type,startDate, endDate,callback);
}
};
ListLoader<?> loader = new BaseListLoader<ListLoadResult<BaseModel>>(proxy);
store = new ListStore<BaseModel>(loader);
store.setMonitorChanges(true);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
columns.add(new ColumnConfig("username",myConstants.user(), 180));
columns.add(new ColumnConfig("assignment", "Assignment", 150));
columns.add(new ColumnConfig("hour", "Hour", 50));
columns.add(new ColumnConfig("department",myConstants.department(), 100));
columns.add(new ColumnConfig("branch",myConstants.branch(), 100));
columns.add(new ColumnConfig("inratesum", "inRateSum", 50));
columns.add(new ColumnConfig("extratesum", "extRateSum", 50));
ColumnModel cm = new ColumnModel(columns);
grid = new Grid<BaseModel>(store,cm);
grid.setLoadMask(true);
grid.setWidth(740);
grid.setHeight(400);
grid.addStyleName(".my-table-style");
grid.setBorders(true);
grid.setAutoExpandColumn("username");
grid.getView().setEmptyText("no data");
grid.setId("myid");
grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
return grid;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:42,代码来源:HourUserReport.java
示例17: doDepartmentComboBox
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
private ComboBox<BeanModel> doDepartmentComboBox(){
ListStore<BeanModel> departmentStore;
final DepartmentServiceAsync departmentService = GWT.create(DepartmentService.class);
ListLoader<?> loader;
RpcProxy<List<DepartmentDTO>> DepartmentProxy = new RpcProxy<List<DepartmentDTO>>() {
@Override
protected void load(Object loadConfig, AsyncCallback<List<DepartmentDTO>> callback) {
departmentService.getDepartments(callback);
}
};
loader = new BaseListLoader<ListLoadResult<ModelData>>(DepartmentProxy,new BeanModelReader());
departmentStore = new ListStore<BeanModel>(loader);
departmentStore.setMonitorChanges(true);
loader.load();
departmentComboBox = new ComboBox<BeanModel>();
departmentComboBox.setDisplayField("name");
departmentComboBox.setWidth(150);
departmentComboBox.setName("department");
departmentComboBox.setFieldLabel("Department");
departmentComboBox.setAllowBlank(false);
departmentComboBox.setEditable(false);
departmentComboBox.setValue(departmentStore.getAt(0));
departmentComboBox.setStore(departmentStore);
departmentComboBox.setTypeAhead(true);
departmentComboBox.setTriggerAction(TriggerAction.ALL);
departmentComboBox.addListener(Events.Select,new Listener<BaseEvent>(){
@Override public void handleEvent(BaseEvent be) {
departmentId = Integer.parseInt(departmentComboBox.getValue().get("id").toString());
loadAssignmentTreeGrid();
departmentReportContentPanel.setDepartment(departmentId);
}
});
return departmentComboBox;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:42,代码来源:DepartmentPanel.java
示例18: getLoader
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
public BaseListLoader getLoader(final String model) {
if (model == null) {
throw new RuntimeException("model = null");
}
/**
* This class is just an attempt to use DataReader to convert data.
* It works well, however, we decide not to adopt this way in our application.
*/
// to bypass a compile error when build with ant
// [javac] D:\JCommerce\JCommerceGae\admin\com\jcommerce\gwt\client\panels\MyPagingListService.java:60:
// type parameter com.extjs.gxt.ui.client.data.ListLoadResult is not within its bound
// final ISpecialServiceAsync service = getSpecialService();
// MyProxy<ListLoadResult> proxy = new MyProxy<ListLoadResult>() {
// public void load(Object loadConfig, AsyncCallback<ListLoadResult> callback) {
// service.getMyPaymentMetaList((ListLoadConfig)loadConfig, callback);
// }
// };
//
// // convert from ListLoadResult<Map<String, Object>> to ListLoadResult<BeanObject>
// DataReader<ListLoadResult> reader = new DataReader<ListLoadResult>() {
//
// public ListLoadResult<BeanObject> read(Object loadConfig, Object data) {
// System.out.println("my reader: "+data.getClass().getName());
// List<BeanObject> destdatas = new ArrayList<BeanObject>();
// ListLoadResult<Map<String, Object>> casteddata = (ListLoadResult)data;
// List<Map<String, Object>> origdatas = casteddata.getData();
// for(Map<String, Object> origdata:origdatas) {
// destdatas.add(new BeanObject(ModelNames.PAYMENT_META, origdata));
// }
//
// ListLoadResult<BeanObject> res = new BaseListLoadResult<BeanObject>(destdatas);
// return res;
// }
//
// };
// // loader
// BaseListLoader loader = new BaseListLoader<ListLoadResult>(proxy, reader);
// loader.setRemoteSort(true);
// return loader;
return null;
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:46,代码来源:MyPagingListService.java
示例19: onRender
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
// loader
RpcProxy<ListLoadResult<BeanObject>> proxy = new RpcProxy<ListLoadResult<BeanObject>>() {
public void load(Object loadConfig, AsyncCallback<ListLoadResult<BeanObject>> callback) {
RemoteService.getSpecialService().getPaymentMetaList((ListLoadConfig) loadConfig, callback);
}
};
loader = new BaseListLoader<ListLoadResult<BeanObject>>(proxy);
// loader = new MyPagingListService().getLoader(
// ModelNames.PAYMENT_META);
loader.setRemoteSort(true);
final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
store.addStoreListener(new StoreListener<BeanObject>() {
public void storeUpdate(StoreEvent<BeanObject> se) {
List<Record> changed = store.getModifiedRecords();
}
});
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig(PaymentConfigMetaForm.ID, Resources.constants
.PaymentMetaList_ID(), 100));
ColumnConfig col = new ColumnConfig(PaymentConfigMetaForm.NAME, Resources.constants
.PaymentMetaList_NAME(), 100);
col.setEditor(new CellEditor(new TextField<String>()));
columns.add(col);
columns.add(new ColumnConfig(PaymentConfigMetaForm.DESCRIPTION, Resources.constants
.PaymentMetaList_DESC(), 200));
columns.add(new ColumnConfig(PaymentConfigMetaForm.FEE, Resources.constants
.PaymentMetaList_PAYFEE(), 100));
columns.add(new ColumnConfig(PaymentConfigMetaForm.COD, Resources.constants
.PaymentMetaList_ISCOD(), 100));
columns.add(new ColumnConfig(PaymentConfigMetaForm.ORDER, Resources.constants
.PaymentMetaList_ORDER(), 100));
ColumnConfig actcol = new ColumnConfig("Action", Resources.constants
.PaymentMetaList_ACTION(), 100);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
grid.setAutoExpandColumn(PaymentConfigMetaForm.DESCRIPTION);
ActionCellRenderer render = new ActionCellRenderer(grid);
actcol.setRenderer(render);
final ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
// panel.setHeading("Paging Grid");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setHeight(500);
panel.setWidth("100%");
// panel.setBottomComponent(toolBar);
add(panel);
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
int w = event.getWidth() - 300;
panel.setWidth(w + "px");
}
});
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:79,代码来源:PaymentMetaListPanel.java
示例20: onRender
import com.extjs.gxt.ui.client.data.BaseListLoader; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
RpcProxy<ListLoadResult<ShippingConfigMetaForm>> proxy = new RpcProxy<ListLoadResult<ShippingConfigMetaForm>>() {
public void load(Object loadConfig, AsyncCallback<ListLoadResult<ShippingConfigMetaForm>> callback) {
RemoteService.getSpecialService().getCombinedShippingMetaList((ListLoadConfig) loadConfig, callback);
}
};
loader = new BaseListLoader<ListLoadResult<ShippingConfigMetaForm>>(proxy);
loader.setRemoteSort(true);
final ListStore<ShippingConfigMetaForm> store = new ListStore<ShippingConfigMetaForm>(loader);
store.addStoreListener(new StoreListener<ShippingConfigMetaForm>() {
public void storeUpdate(StoreEvent<ShippingConfigMetaForm> se) {
List<Record> changed = store.getModifiedRecords();
}
});
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<ShippingConfigMetaForm> smRowSelection = new CheckBoxSelectionModel<ShippingConfigMetaForm>();
columns.add(smRowSelection.getColumn());
// columns.add(new ColumnConfig(ShippingConfigMetaForm.ID, Resources.constants
// .ShippingMetaList_ID(), 50));
ColumnConfig col = new ColumnConfig(ShippingConfigMetaForm.NAME, Resources.constants
.ShippingMetaList_NAME(), 100);
col.setEditor(new CellEditor(new TextField<String>()));
columns.add(col);
columns.add(new ColumnConfig(ShippingConfigMetaForm.DESCRIPTION, Resources.constants
.ShippingMetaList_DESC(), 200));
columns.add(new ColumnConfig(ShippingConfigMetaForm.INSURE, Resources.constants
.ShippingMetaList_INSURE(), 100));
columns.add(new ColumnConfig(ShippingConfigMetaForm.SUPPORTCOD, Resources.constants
.ShippingMetaList_COD(), 100));
columns.add(new ColumnConfig(ShippingConfigMetaForm.VERSION, Resources.constants
.ShippingMetaList_VERSION(), 100));
columns.add(new ColumnConfig(ShippingConfigMetaForm.AUTHOR, Resources.constants
.ShippingMetaList_AUTHOR(), 100));
ColumnConfig actcol = new ColumnConfig("Action", Resources.constants
.ShippingMetaList_ACTION(), 200);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<ShippingConfigMetaForm> grid = new EditorGrid<ShippingConfigMetaForm>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
grid.setAutoExpandColumn(ShippingConfigMetaForm.NAME);
ActionCellRenderer render = new ActionCellRenderer(grid);
actcol.setRenderer(render);
final ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
// panel.setHeading("Paging Grid");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setHeight(500);
panel.setWidth("100%");
// panel.setBottomComponent(toolBar);
add(panel);
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
int w = event.getWidth() - 300;
panel.setWidth(w + "px");
}
});
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:77,代码来源:ShippingMetaListPanel.java
注:本文中的com.extjs.gxt.ui.client.data.BaseListLoader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论