当前位置: 首页>>代码示例>>Java>>正文


Java BasePagingLoader类代码示例

本文整理汇总了Java中com.extjs.gxt.ui.client.data.BasePagingLoader的典型用法代码示例。如果您正苦于以下问题:Java BasePagingLoader类的具体用法?Java BasePagingLoader怎么用?Java BasePagingLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BasePagingLoader类属于com.extjs.gxt.ui.client.data包,在下文中一共展示了BasePagingLoader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bind

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
@Override
public void bind(PagingLoader loader) {
	super.bind(loader);
	if (loader instanceof BasePagingLoader) {
		
		config = getLoadConfig();
		((BasePagingLoadConfig)config).set("query", gridConfig.getQuery());
		config.setOffset(0);
		config.setLimit(pageSize);
		((BasePagingLoader)loader).setReuseLoadConfig(true);
		((BasePagingLoader)loader).useLoadConfig(config);
	}
	loader.addListener(Loader.BeforeLoad, new Listener<LoadEvent>() {

		public void handleEvent(LoadEvent be) {
			if (be.config instanceof BasePagingLoadConfig) {
				beforeLoad((BasePagingLoadConfig)be.config);
			}
		}
		
	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:23,代码来源:SearchPagingToolBar.java

示例2: getAvailableProfiles

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的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;
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:30,代码来源:AddGsUserWidget.java

示例3: getLoader

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
public BasePagingLoader<PagingLoadResult<BeanObject>> getLoader(final Criteria criteria) {
    final String model = ModelNames.BONUSTYPE;
    
    final IShopServiceAsync service = getService();
    MyRpcProxy<PagingLoadResult<BeanObject>> proxy = new MyRpcProxy<PagingLoadResult<BeanObject>>() {
        public void load(Object loadConfig, AsyncCallback callback) {
            service.getUserBonusPagingList(criteria, (PagingLoadConfig) loadConfig, callback);
        }
    };
    proxy.setCriteria(criteria);
    
    // loader
    BasePagingLoader<PagingLoadResult<BeanObject>> loader = new BasePagingLoader<PagingLoadResult<BeanObject>>(proxy);
    loader.setRemoteSort(true);

    return loader;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:18,代码来源:BonusService.java

示例4: getLoader

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
public BasePagingLoader getLoader(final String model) {
    if (model == null) {
        throw new RuntimeException("model = null");
    }
    
    final IShopServiceAsync service = getService();
    MyProxy proxy = new MyProxy() {
        public void load(Object loadConfig, AsyncCallback callback) {
        	           	            	
            service.getIndexPagingList(model,(PagingLoadConfig) loadConfig, callback);
        }
    };
   
    
    // loader
    BasePagingLoader loader = new BasePagingLoader(proxy);
    loader.setRemoteSort(true);

    return loader;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:21,代码来源:IndexService.java

示例5: getLoader

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
public BasePagingLoader getLoader(final String model, final Map<String,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.getPagingList(model, criteria, wantedFields, (PagingLoadConfig) loadConfig, callback);
//            }
//        };
//
//        // loader
//        BasePagingLoader loader = new BasePagingLoader(proxy);
//        loader.setRemoteSort(true);
//
//        return loader;
    	return getLoader(model, null, wantedFields);
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:20,代码来源:PagingListService.java

示例6: getLoader

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
public BasePagingLoader getLoader(final Map<String, String> idMap, final Criteria criteria,
		final List<String> wantedFields) {

	final IShopServiceAsync service = getService();
	MyProxy proxy = new MyProxy() {
		@Override
		protected void load(Object config, AsyncCallback callback) {
			service.getAllDiliveryMethods((PagingLoadConfig) config,
					callback);
		}
	};
	proxy.setCriteria(criteria);
	BasePagingLoader loader = new BasePagingLoader(proxy);
	loader.setRemoteSort(true);

	updateIdMap(idMap);
	return loader;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:19,代码来源:ShippingInitService.java

示例7: getLoader

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
public BasePagingLoader getLoader(final Map<String, String> idMap, final Criteria criteria,
		final List<String> wantedFields)
{
	final IShopServiceAsync service = getService();
	MyProxy proxy = new MyProxy() {
		@Override
		protected void load(Object config, AsyncCallback callback) {
			service.getAllPaymentMethods((PagingLoadConfig) config, callback);
		}
	};
	proxy.setCriteria(criteria);
	
	BasePagingLoader loader = new BasePagingLoader(proxy);
	loader.setRemoteSort(true);

	
	updateIdMap(idMap);
	return loader;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:20,代码来源:PaymentInitService.java

示例8: bind

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
public void bind(BasePagingLoader loader, BasePagingLoadConfig cfg) {
	this.loader = loader;
	config = cfg;
	loader.addListener(Loader.BeforeLoad, new Listener<LoadEvent>() {

		public void handleEvent(LoadEvent be) {
			if (be.config instanceof BasePagingLoadConfig) {
				beforeLoad((BasePagingLoadConfig)be.config);
			}
		}
		
	});
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:15,代码来源:GridControllToolBar.java

示例9: createStore

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的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();
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:29,代码来源:SearchPagUserWidget.java

示例10: getPayPanel

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
public static ContentPanel getPayPanel(){
	
	List<String> wantedFields = new ArrayList<String>();
   	wantedFields.add(IOrder.PAYMENT);
   	wantedFields.add(IOrder.PAYNOTE);
   	
   	BasePagingLoader loader = new PagingListService().getLoader(ModelNames.ORDER, wantedFields);
	final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
	List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	
	final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
	columns.add(smRowSelection.getColumn());
	columns.add(new ColumnConfig(IOrder.PAYMENT, "名称", 80));
	columns.add(new ColumnConfig(IOrder.PAYNOTE, "描述", 104));
	columns.add(new ColumnConfig("handlingFee", "手续费", 80));
	
	ColumnModel cm = new ColumnModel(columns);
	
       Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
       grid.setLoadMask(true);
       grid.setBorders(true);
       grid.setSize(750, 200);
      
	
       final ContentPanel panel = new ContentPanel();
       panel.setFrame(true);
       panel.setCollapsible(true);
       panel.setAnimCollapse(false);
       panel.setButtonAlign(HorizontalAlignment.CENTER);
       panel.setSize(750, 200);
       panel.setLayout(new FitLayout());
       panel.setHeading("选择支付方式");
       panel.add(grid);
       return panel;
       
	
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:38,代码来源:SelectPayPanel.java

示例11: initUI

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
public void initUI() {
	
	// Create Loader.
	BasePagingLoader<BasePagingLoadConfig, BasePagingLoadResult<GroupCollection>> loader = new BasePagingLoader<BasePagingLoadConfig, BasePagingLoadResult<GroupCollection>>(desc.getProxy(id, (GroupCollection)getValue()));
	
	// Create Store
	ListStore<GroupCollection> store = new ListStore<GroupCollection>(loader);
	store.setMonitorChanges(true);
	
	// Create editor grid.
	ColumnModel model = desc.getTableColumnModel(name, id, permissions);
	EditorGrid<GroupCollection> grid = new EditorGrid<GroupCollection>(store, model);
	for (int i = 0; i < model.getColumnCount(); i++) {
		ColumnConfig cfg = model.getColumn(i);
		if (cfg instanceof ComponentPlugin) {
			grid.addPlugin((ComponentPlugin)cfg);
		}
	}
	
	grid.setBorders(true);
	grid.setLoadMask(true);
	
	
	// Fill the component with the grid.
	setLayout(new FitLayout());
	
	// Add this for scrollbars!
	ContentPanel panel = new ContentPanel();
	panel.setHeaderVisible(false);
	panel.setLayout(new FitLayout());
	panel.add(grid);
	PagingToolBar paging = new PageSizePagingToolBar(50);
	paging.bind(loader);
	panel.setBottomComponent(paging);
	
	add(panel);

	
	
	loader.load();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:42,代码来源:GroupTableWidget.java

示例12: initialize

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
/**
 * Initializes the widget view.
 */
@Override
public void initialize() {

   // Paging
	proxy = new PagingContactsProxy();

	pagingLoader = new BasePagingLoader<PagingLoadResult<DashboardContact>>(proxy) {
		@Override
		protected Object newLoadConfig() {
			return new BaseFilterPagingLoadConfig();
		}
	};
	pagingLoader.setRemoteSort(true);

	pagingToolBar = new NoRefreshPagingToolBar(10);
	pagingToolBar.bind(pagingLoader);

	// Store.
	final ListStore<DashboardContact> contactStore = new ListStore<DashboardContact>(pagingLoader);
	contactStore.setMonitorChanges(true);

	// Default sort order of the contacts grid.
	pagingLoader.setSortField(ContactHistory.UPDATED_AT);
	pagingLoader.setSortDir(Style.SortDir.DESC);

	// Grid.
	contactTreeGrid = new Grid<DashboardContact>(contactStore, buildContactGridColumnModel());
	contactTreeGrid.setBorders(true);
	contactTreeGrid.setTrackMouseOver(false);

	// Apply grid filters
	gridFilters = new GridFilters();

	initGridFilters();

	contactTreeGrid.addPlugin(gridFilters);

	// Refresh button.
	refreshButton = new Button(I18N.CONSTANTS.refreshContactList(), IconImageBundle.ICONS.refresh());
	refreshButton.setToolTip(I18N.CONSTANTS.refreshContactListDetails());
	refreshButton.addStyleName(STYLE_CONTACT_REFRESH_BUTTON);

	// Refresh date.
	refreshDateLabel = new Label();
	refreshSeparator = new SeparatorToolItem();

	toolbar = new ToolBar();
	addContactButton = new Button(I18N.CONSTANTS.addContact());
	toolbar.add(addContactButton);
	importButton = new Button(I18N.CONSTANTS.importContact());
	toolbar.add(importButton);

	// Preparing 'export' functionality.
	exportButton = new Button(I18N.CONSTANTS.exportAll(), IconImageBundle.ICONS.excel());
	toolbar.add(exportButton);

	if(Profiler.INSTANCE.isOfflineMode()) {
		toolbar.setEnabled(false);
	}

	// Panel
	contactTreePanel = Panels.content(I18N.CONSTANTS.contacts());
	contactTreePanel.setTopComponent(toolbar);
	contactTreePanel.setBottomComponent(pagingToolBar);

}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:70,代码来源:ContactsListView.java

示例13: MagazineManager

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
/**
 * 初始化界面。
 */
public MagazineManager() {
    curState = new State();
    
	BasePagingLoader loader = new PagingListService().getLoader(ModelNames.MAILTEMPLATE, criteria);
	loader.load(0, 10);
	store = new ListStore<BeanObject>(loader);
	toolBar = new PagingToolBar(10);
	toolBar.bind(loader);
	
	List<ColumnConfig> columns = new ArrayList<ColumnConfig>();   
	ColumnConfig title = new ColumnConfig(IMailTemplate.SUBJECT, "杂志标题", 200);
       columns.add(title);
       columns.add(new ColumnConfig(IMailTemplate.LASTMODIFY, "杂志上次编辑时间", 160));
       columns.add(new ColumnConfig(IMailTemplate.LASTSEND, "杂志上次发送时间", 160));     
       ColumnConfig insert = new ColumnConfig("insert", "插入发送队列", 160);
       columns.add(insert);
       ColumnConfig actcol = new ColumnConfig("Action", "操作", 100);
	columns.add(actcol);
       ColumnModel cm = new ColumnModel(columns);
       
       grid = new Grid<BeanObject>(store, cm);
       grid.setLoadMask(true);
       grid.setBorders(true);
       
       ActionCellRenderer render = new ActionCellRenderer(grid);
       ActionCellRenderer insertRender = new ActionCellRenderer(grid);
	ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
	act.setImage("icon_edit.gif");
	act.setAction("editMagazine($id)");
	act.setTooltip("编辑");
	render.addAction(act);
	act = new ActionCellRenderer.ActionInfo();		
	act.setImage("icon_trash.gif");
	act.setAction("deleteMagazine($id)");
	act.setTooltip("删除");
	render.addAction(act);
	act = new ActionCellRenderer.ActionInfo();
	act.setText("插入队列");
	act.setAction("insertMagazine($id)");
	act.setTooltip("插入队列");
	insertRender.addAction(act);

	actcol.setRenderer(render);
	insert.setRenderer(insertRender);
       
       ContentPanel panel = new ContentPanel();
       panel.setFrame(true);
       panel.setCollapsible(true);
       panel.setAnimCollapse(false);
       panel.setButtonAlign(HorizontalAlignment.CENTER);
       panel.setIconStyle("icon-table");
       panel.setLayout(new FitLayout());
       panel.add(grid);
       panel.setSize(850, 350);
       panel.setBottomComponent(toolBar);     
       panel.setHeading("邮件杂志列表");
       panel.setButtonAlign(HorizontalAlignment.LEFT);
       
       // 添加新杂志
       final com.extjs.gxt.ui.client.widget.button.Button addMagazine = new com.extjs.gxt.ui.client.widget.button.Button("添加新杂志");
       addMagazine.addSelectionListener(new SelectionListener<ButtonEvent>() {
           public void componentSelected(ButtonEvent ce) {
           	// add new magazine function
           	NewMagazine.State state = new NewMagazine.State();
           	state.execute();
           }
         });
       panel.addButton(addMagazine);
       
       add(panel);
       initJS(this);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:76,代码来源:MagazineManager.java

示例14: createGrid

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
private void createGrid() {

        BasePagingLoader loader = new PagingListService().getLoader(ModelNames.BRAND);

        loader.load(0, 50);

        final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);

        store.addStoreListener(new StoreListener<BeanObject>() {
            public void storeUpdate(StoreEvent<BeanObject> se) {
                List<Record> changed = store.getModifiedRecords();
            }
        });

        toolBar = new PagingToolBar(50);
        toolBar.bind(loader);

        List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
        // CheckBoxSelectionModel<BeanObject> sm = new
        // CheckBoxSelectionModel<BeanObject>();
        // columns.add(sm.getColumn());
        columns.add(new ColumnConfig(IBrand.NAME, "品牌名称", 80));
        columns.add(new ColumnConfig(IBrand.SITE, "品牌网址", 150));
        columns.add(new ColumnConfig(IBrand.DESC, "品牌描述", 230));
        columns.add(new ColumnConfig(IBrand.ORDER, "排序", 50));
        columns.add(new CheckColumnConfig(IBrand.SHOW, "是否显示", 80));
        ColumnConfig actcol = new ColumnConfig("Action", "操作", 140);
        columns.add(actcol);

        ColumnModel cm = new ColumnModel(columns);

        Grid<BeanObject> grid = new Grid<BeanObject>(store, cm);
        grid.setLoadMask(true);
        grid.setBorders(true);
        // grid.setSelectionModel(sm);
        // grid.setAutoExpandColumn("forum");

        ActionCellRenderer render = new ActionCellRenderer(grid);
        ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
        act.setText("编辑 ");
        act.setAction("changeBrand($id)");
        act.setTooltip(Resources.constants.GoodsList_action_edit());
        render.addAction(act);
        act = new ActionCellRenderer.ActionInfo();
        act.setText(" 删除");
        act.setAction("deleteBrand($id)");
        act.setTooltip(Resources.constants.GoodsList_action_delete());
        render.addAction(act);
        actcol.setRenderer(render);

        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.setSize(750, 350);
        panel.setBottomComponent(toolBar);

        panel.setButtonAlign(HorizontalAlignment.CENTER);

        vp.add(panel);

    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:68,代码来源:DatabaseRestore.java

示例15: onRender

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
		super.onRender(parent, index);

//		BasePagingLoader loader = new ShippingInitService().getLoader();
		BasePagingLoader loader = null;
		loader.load(0, 50);
		final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
		toolBar = new PagingToolBar(50);
		toolBar.bind(loader);

		List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
		columns.add(new ColumnConfig(IDeliveryMeta.NAME, "配送方式名称", 120));
		columns.add(new ColumnConfig(IDeliveryMeta.DESC, "配送方式描述", 320));
		columns.add(new ColumnConfig(IDeliveryMeta.SUPPORT_COD, "货到付款?", 80));
		columns.add(new ColumnConfig(IDeliveryMeta.INSURE, "保价费用", 80));
		columns.add(new ColumnConfig(IDeliveryMeta.CODE, "插件版本", 80));
		ColumnConfig actcol = new ColumnConfig("Action", "操作", 100);
		columns.add(actcol);

		ColumnModel cm = new ColumnModel(columns);

		Grid<BeanObject> grid = new Grid<BeanObject>(store, cm);
		grid.setLoadMask(true);
		grid.setBorders(true);

		MyActionCellRenderer render = new MyActionCellRenderer(grid);
		actcol.setRenderer(render);

		ContentPanel panel = new ContentPanel();
		panel.setFrame(true);
		panel.setCollapsible(true);
		panel.setAnimCollapse(false);
		panel.setButtonAlign(HorizontalAlignment.CENTER);
		panel.setIconStyle("icon-table");
		panel.setHeading("setup the deliveryMeta");
		panel.setLayout(new FitLayout());
		panel.setSize(800, 350);
		panel.add(grid);

		this.add(panel);
	}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:42,代码来源:DiliveryMethodsPanel.java


注:本文中的com.extjs.gxt.ui.client.data.BasePagingLoader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。