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


Java BasePagingLoader.load方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: PayPanel

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入方法依赖的package包/类
public PayPanel(){
	initJS(this);
	Criteria criteria = new Criteria();
	
	BasePagingLoader loader = new PagingListService().getLoader(ModelNames.PAYMENT, criteria);
   	loader.load(0, 10);
   	store = new ListStore<BeanObject>(loader);
   	
	toolBar = new PagingToolBar(10);
	toolBar.bind(loader);

	List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	
	final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
	columns.add(smRowSelection.getColumn());
	columns.add(new ColumnConfig(IPayment.NAME, "名称", 80));
	columns.add(new ColumnConfig(IPayment.DESCRIPTION, "描述", 200));
	columns.add(new ColumnConfig(IPayment.FEE, "手续费", 80));
	
	ColumnConfig actcol = new ColumnConfig("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.setSize(750, 200);
       
       ActionCellRenderer render = new ActionCellRenderer(grid);
       ActionCellRenderer.ActionInfo act = null;
       act = new ActionCellRenderer.ActionInfo();
       act.setImage("yes.gif");
	act.setAction("choosePayment($id)");
	render.addAction(act);
	
	actcol.setRenderer(render);
	
       final ContentPanel panel = new ContentPanel();
       panel.setFrame(true);
       panel.setCollapsible(true);
       panel.setAnimCollapse(false);
       panel.setButtonAlign(HorizontalAlignment.CENTER);
       panel.setLayout(new FitLayout());
       panel.add(grid);
       
       this.setSize(750, 200);
       this.setHeading("选择支付方式");
       this.add(panel);
       
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:51,代码来源:PayPanel.java

示例6: initailOrderActionPanel

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入方法依赖的package包/类
public ContentPanel initailOrderActionPanel()
{
	
	if( null != theOrderInfo.getString(IOrder.ID) && !(theOrderInfo.getString(IOrder.ID).equals("")))
	{
		orderID = theOrderInfo.getString(IOrder.ID);
	}
	orderActionCri.addCondition(new Condition(IOrderAction.ORDER, Condition.EQUALS, orderID));
	int pageSize = 10;
	
	BasePagingLoader loader = new PagingListService().getLoader(ModelNames.ORDERACTION, orderActionCri);
	loader.load(0, 10);
	ListStore<BeanObject> orderActionStore = new ListStore<BeanObject>(loader);
	List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	Grid<BeanObject> grid;
	
	toolBar = new PagingToolBar(10);
	toolBar.bind(loader);
	//The beanobject in table is IOrderGoods
   	columns.add(new ColumnConfig(IOrderAction.ACTIONUSER, "操作者", 80));
   	columns.add(new ColumnConfig(IOrderAction.LOGTIME, "操作时间", 200));
	columns.add(new ColumnConfig(IOrderAction.ORDERSTATUS, "订单状态", 100));
	columns.add(new ColumnConfig(IOrderAction.SHIPPINGSTATUS, "发货状态", 80));
       columns.add(new ColumnConfig(IOrderAction.PAYSTATUS, "付款状态", 80));
       columns.add(new ColumnConfig(IOrderAction.NOTE, "备注", 200));
       
       ColumnModel cm = new ColumnModel(columns);
       grid = new EditorGrid<BeanObject>(orderActionStore, cm);
       grid.setLoadMask(true);
       grid.setBorders(true);
       grid.setSize(750, 200);
       
   	
       final ContentPanel panel = new ContentPanel();
       panel.setFrame(true);
       panel.setCollapsible(true);
       panel.setButtonAlign(HorizontalAlignment.CENTER);
       panel.add(grid);
       panel.setSize(780, 200);
       panel.setBottomComponent(toolBar);
       return panel;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:43,代码来源:ShowOrderPanel.java

示例7: onRender

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入方法依赖的package包/类
protected void onRender(Element parent, int index) {
		super.onRender(parent, index);
		BasePagingLoader loader = new PagingListService().getLoader(
				ModelNames.USERRANK, criteria);
		loader.load(0, 10);

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

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

		List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
		final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
		columns.add(smRowSelection.getColumn());
		columns.add(new ColumnConfig(IUserRank.NAME, "会员等级名称", 100));
		columns.add(new ColumnConfig(IUserRank.MINPOINTS, "积分下限", 70));
		columns.add(new ColumnConfig(IUserRank.MAXPOINTS, "积分上限", 70));
		columns.add(new ColumnConfig(IUserRank.DISCOUNT, "初始折扣率", 70));
//		columns.add(new CheckColumnConfig(IUserRank.SPECIAL, "特殊会员组", 120));
//		columns.add(new CheckColumnConfig(IUserRank.SHOWPRICE, "显示价格", 80));

		ColumnConfig actcol = new ColumnConfig("Action", Resources.constants
				.GoodsList_action(), 120);
		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);

		ActionCellRenderer render = new ActionCellRenderer(grid);
		ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
		act = new ActionCellRenderer.ActionInfo();
		
		act.setImage("icon_edit.gif");
		act.setAction("updateMemberAction($id)");
		act.setTooltip("编辑");
		render.addAction(act);
		
		act = new ActionCellRenderer.ActionInfo();
		act.setImage("icon_trash.gif");
		act.setAction("deleteMemberAction($id)");
		act.setTooltip("删除");
		render.addAction(act);
		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("会员等级");
		panel.setLayout(new FitLayout());
		panel.add(grid);
        panel.setHeight(500);
        panel.setWidth("100%");
		panel.setBottomComponent(toolBar);

//		panel.setButtonAlign(HorizontalAlignment.CENTER);
//		panel.addButton(new com.extjs.gxt.ui.client.widget.button.Button(
//				"添加会员级别", new SelectionListener<ButtonEvent>() {
//					public void componentSelected(ButtonEvent ce) {
//					    NewMemberLevel.State state = new NewMemberLevel.State();
//					    state.execute();
//					}
//				}));

		add(panel);

        Window.addResizeHandler(new ResizeHandler() {
            public void onResize(ResizeEvent event) {
                int w = event.getWidth() - 300;
                panel.setWidth(w + "px");
            }
        });
	}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:80,代码来源:MemberLevelList.java

示例8: onRender

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

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

        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(ICategory.NAME, "分类名称", 150));
        columns.add(new ColumnConfig(ICategory.MEASUREUNIT, "数量单位", 80));
        columns.add(new CheckColumnConfig(ICategory.SHOWINNAVIGATOR, "导航栏", 80));
        columns.add(new CheckColumnConfig(ICategory.SHOW, "是否显示", 80));        
        columns.add(new ColumnConfig(ICategory.GRADE, "价格分级", 60));
        columns.add(new ColumnConfig(ICategory.SORTORDER, "排序", 50));        
        ColumnConfig actcol = new ColumnConfig("Action", "操作", 150);
        columns.add(actcol);

        ColumnModel cm = new ColumnModel(columns);

        Grid<BeanObject> grid = new EditorGrid<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("changeCategory($id)");
        render.addAction(act);
        act = new ActionCellRenderer.ActionInfo();
        act.setText(" 删除");
		act.setAction("deleteCategory($id)");
		act.setTooltip(Resources.constants.GoodsList_action_delete());
		render.addAction(act);
        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);
        
//        panel.setButtonAlign(HorizontalAlignment.CENTER);
//        panel.addButton(new com.extjs.gxt.ui.client.widget.button.Button("添加分类", new SelectionListener<ButtonEvent>() {
//          public void componentSelected(ButtonEvent ce) {
//              NewCategory.State state = new NewCategory.State();
//              state.execute();
//          }
//        }));
//        
        add(panel);        
        
        Window.addResizeHandler(new ResizeHandler() {
            public void onResize(ResizeEvent event) {
                int w = event.getWidth() - 300;
                panel.setWidth(w + "px");
            }
        });
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:82,代码来源:CategoryInfo.java

示例9: onRender

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

        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);

        final Grid<BeanObject> grid = new EditorGrid<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);        
        
        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.setSize("100%", "500");
        panel.setBottomComponent(toolBar);     
//        panel.setButtonAlign(HorizontalAlignment.CENTER);
//        panel.addButton(new com.extjs.gxt.ui.client.widget.button.Button("添加品牌", new SelectionListener<ButtonEvent>() {
//          public void componentSelected(ButtonEvent ce) {
//              NewBrand.State state = new NewBrand.State();
//              state.execute();
//          }
//        }));
        
        Window.addResizeHandler(new ResizeHandler() {
            public void onResize(ResizeEvent event) {
                int w = event.getWidth() - 300;
                panel.setWidth(w + "px");
            }
        });
        
        add(panel);       
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:79,代码来源:BrandInfo.java

示例10: onRender

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入方法依赖的package包/类
protected void onRender(Element parent, int index) {
	super.onRender(parent, index);
	BasePagingLoader loader = new PagingListService().getLoader(
			ModelNames.ADMINUSER, criteria);
	loader.load(0, 10);

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

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

	List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	columns.add(new ColumnConfig(IAdminUser.NAME, "用户名", 120));
	columns.add(new ColumnConfig(IAdminUser.EMAIL, "Email地址", 180));
	columns.add(new ColumnConfig(IAdminUser.ADDTIME, "加入时间", 180));
	columns.add(new ColumnConfig(IAdminUser.LASTLOGIN, "最后登录时间", 180));

	ColumnConfig actcol = new ColumnConfig("Action", Resources.constants
			.GoodsList_action(), 140);
	columns.add(actcol);

	ColumnModel cm = new ColumnModel(columns);

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

	ActionCellRenderer render = new ActionCellRenderer(grid);
	ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
	act.setImage("icon_trash.gif");
	act.setAction("deleteAdminAction($id)");
	act.setTooltip("删除");
	render.addAction(act);
	
	act = new ActionCellRenderer.ActionInfo();
	act.setImage("icon_edit.gif");
	act.setAction("editAdminAction($id)");
	act.setTooltip("编辑");
	render.addAction(act);
	
	act = new ActionCellRenderer.ActionInfo();
	act.setImage("assign_role.gif");
	act.setAction("assignRoleAction($id)");
	act.setTooltip("分派权限");
	render.addAction(act);
	
	act = new ActionCellRenderer.ActionInfo();
	act.setImage("view_log.gif");
	act.setAction("viewLogAction($id)");
	act.setTooltip("查看日志");
	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("管理员列表");
	panel.setLayout(new FitLayout());
	panel.add(grid);
	panel.setSize(800, 350);
	panel.setBottomComponent(toolBar);
	panel.setButtonAlign(HorizontalAlignment.CENTER);
	Button addAdmin = new Button("添加管理员");
	addAdmin.addSelectionListener(new SelectionListener<ButtonEvent>() {
	      public void componentSelected(ButtonEvent ce) {
	          NewAdminUser.State state = new NewAdminUser.State();
	          state.execute();
	      }
	    });
	panel.addButton(addAdmin);

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

示例11: onRender

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入方法依赖的package包/类
protected void onRender(Element parent, int index) {
		super.onRender(parent, index);
		
		 ContentPanel inforPanel = new ContentPanel();
		 inforPanel.setHeading(this.getCurState().getSnatch().getString(ISnatch.SNATCH_NAME));
		 HorizontalPanel infoContent = new HorizontalPanel();
		 infoContent.setSpacing(20);
		 Label sk = new Label("活动开始时间: ");
		 Label sv = new Label(this.getCurState().getSnatch().getString(ISnatch.START_TIME));
		 Label ek = new Label("活动结束时间: ");
		 Label ev = new Label(this.getCurState().getSnatch().getString(ISnatch.END_TIME));
		 infoContent.add(sk);
		 infoContent.add(sv);
		 infoContent.add(ek);
		 infoContent.add(ev);
		 inforPanel.add(infoContent);
		 
		BasePagingLoader loader = new PagingListService().getLoader(ModelNames.SNATCHLOG);
		loader.load(0, 10);
		store = new ListStore<BeanObject>(loader);
		toolBar = new PagingToolBar(10);
		toolBar.bind(loader);
		
		List<ColumnConfig> columns = new ArrayList<ColumnConfig>();   
		final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
		columns.add(smRowSelection.getColumn());
        columns.add(new ColumnConfig("number", "编号", 50)); 
		columns.add(new ColumnConfig(ISnatchLog.USER_ID, "出价用户", 150));
        columns.add(new ColumnConfig(ISnatchLog.BID_TIME, "出价时间", 150));
        columns.add(new ColumnConfig(ISnatchLog.BID_PRICE, "所出价格", 150));
        
        ColumnModel cm = new ColumnModel(columns);
        grid = new Grid<BeanObject>(store, cm);
        
//        grid.setLoadMask(true);
//        grid.setBorders(true);
        grid.setSelectionModel(smRowSelection);  
        grid.addPlugin(smRowSelection);
        grid.setHeight(250);
		 
		ContentPanel contentPanel = new ContentPanel();
		contentPanel.setFrame(true);
		contentPanel.setCollapsible(true);
		contentPanel.setAnimCollapse(false);
		contentPanel.setButtonAlign(HorizontalAlignment.CENTER);
		contentPanel.setIconStyle("icon-table");
		contentPanel.setLayout(new FitLayout());
		contentPanel.add(grid);
		contentPanel.setBottomComponent(toolBar);
		 
		 
		topPanel.add(inforPanel);
		topPanel.add(contentPanel);
		add(topPanel);
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:56,代码来源:SearchSnatchPanel.java

示例12: onRender

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

        BasePagingLoader loader = new BonusService().getLoader(null);

        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(IBonusType.TYPE_NAME, "类型名称", 100));
        ColumnConfig typeCol = new ColumnConfig(IBonusType.SEND_TYPE, "发放类型", 100);
        typeCol.setRenderer(new TypeCellRenderer());
        columns.add(typeCol);
        columns.add(new ColumnConfig(IBonusType.TYPE_MONEY, "红包金额", 80));
        columns.add(new ColumnConfig(IBonusType.MIN_AMOUNT, "订单下限", 80));
        columns.add(new ColumnConfig(IBonusType.NUMBER, "发放数量", 80));
        columns.add(new ColumnConfig(IBonusType.USED_NUMBER, "使用数量", 80));
        ColumnConfig actcol = new ColumnConfig("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(sm);
//        grid.setAutoExpandColumn("forum");

        ActionCellRenderer render = new ActionCellRenderer(grid);
        ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();        
        act.setText("编辑 ");
        act.setAction("changeBonus($id)");
        act.setTooltip(Resources.constants.GoodsList_action_edit());
        render.addAction(act);
        act = new ActionCellRenderer.ActionInfo();
        act.setText(" 删除");
		act.setAction("deleteBonus($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);
//        panel.addButton(new com.extjs.gxt.ui.client.widget.button.Button("添加品牌", new SelectionListener<ButtonEvent>() {
//          public void componentSelected(ButtonEvent ce) {
//              NewBrand.State state = new NewBrand.State();
//              state.execute();
//          }
//        }));
        
        add(panel);       
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:76,代码来源:BonusListPanel.java

示例13: onRender

import com.extjs.gxt.ui.client.data.BasePagingLoader; //导入方法依赖的package包/类
protected void onRender(Element parent, int index) {
		super.onRender(parent, index);
		
		 ContentPanel inforPanel = new ContentPanel();
//		 inforPanel.setHeading(this.getCurState().getAuction().getString(IAuction.AUCTION_NAME));
		 HorizontalPanel infoContent = new HorizontalPanel();
		 infoContent.setSpacing(20);
		 Label sk = new Label("拍卖活动名称:");
		 Label sv = new Label(this.getCurState().getAuction().getString(IAuction.AUCTION_NAME));
		 Label ek = new Label("拍卖商品名称:");
		 Label ev = new Label(this.getCurState().getAuction().getString(IAuction.GOOD_NAME));
		 infoContent.add(sk);
		 infoContent.add(sv);
		 infoContent.add(ek);
		 infoContent.add(ev);
		 inforPanel.add(infoContent);
		 
		BasePagingLoader loader = new PagingListService().getLoader(ModelNames.AUCTIONLOG);
		loader.load(0, 10);
		store = new ListStore<BeanObject>(loader);
		toolBar = new PagingToolBar(10);
		toolBar.bind(loader);
		
		List<ColumnConfig> columns = new ArrayList<ColumnConfig>();   
		final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
		columns.add(smRowSelection.getColumn());
        columns.add(new ColumnConfig(IAuctionLog.BID_USER, "买家", 150)); 
		columns.add(new ColumnConfig(IAuctionLog.BID_PRICE, "出价", 150));
        columns.add(new ColumnConfig(IAuctionLog.BID_TIME, "时间", 150));
        columns.add(new ColumnConfig(IAuctionLog.LOG_ID, "状态", 150));
        
        ColumnModel cm = new ColumnModel(columns);
        grid = new Grid<BeanObject>(store, cm);
        
//        grid.setLoadMask(true);
//        grid.setBorders(true);
        grid.setSelectionModel(smRowSelection);  
        grid.addPlugin(smRowSelection);
        grid.setHeight(250);
		 
		ContentPanel contentPanel = new ContentPanel();
		contentPanel.setFrame(true);
		contentPanel.setCollapsible(true);
		contentPanel.setAnimCollapse(false);
		contentPanel.setButtonAlign(HorizontalAlignment.CENTER);
		contentPanel.setIconStyle("icon-table");
		contentPanel.setLayout(new FitLayout());
		contentPanel.add(grid);
		contentPanel.setBottomComponent(toolBar);
		 
		 
		topPanel.add(inforPanel);
		topPanel.add(contentPanel);
		add(topPanel);
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:56,代码来源:SearchAuctionPanel.java

示例14: onRender

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

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

        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(IPack.NAME, "商品包装名称", 100));
        columns.add(new ColumnConfig(IPack.FEE, "费用", 80));
        columns.add(new ColumnConfig(IPack.FREEMONEY, "免费额度", 80));
        columns.add(new ColumnConfig(IPack.DESC, "包装描述", 300));
        ColumnConfig actcol = new ColumnConfig("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(sm);
//        grid.setAutoExpandColumn("forum");

        ActionCellRenderer render = new ActionCellRenderer(grid);
        ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();        
        act.setText("编辑 ");
        act.setAction("changePack($id)");
        act.setTooltip(Resources.constants.GoodsList_action_edit());
        render.addAction(act);
        act = new ActionCellRenderer.ActionInfo();
        act.setText(" 删除");
		act.setAction("deletePack($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);
//        panel.addButton(new com.extjs.gxt.ui.client.widget.button.Button("添加品牌", new SelectionListener<ButtonEvent>() {
//          public void componentSelected(ButtonEvent ce) {
//              NewBrand.State state = new NewBrand.State();
//              state.execute();
//          }
//        }));
        
        add(panel);       
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:72,代码来源:PackListPanel.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 PagingListService().getLoader(ModelNames.CARD, criteria);
		loader.load(0, 10);
		store = new ListStore<BeanObject>(loader);
		toolBar = new PagingToolBar(10);
		toolBar.bind(loader);
		
		List<ColumnConfig> columns = new ArrayList<ColumnConfig>(); 
		ColumnConfig picture = new ColumnConfig("", "", 20);
		columns.add(picture);
		columns.add(new ColumnConfig(ICard.NAME, "贺卡名称", 100));
		columns.add(new ColumnConfig(ICard.FEE, "贺卡费用", 100));
		columns.add(new ColumnConfig(ICard.FREEMONEY, "贺卡免费额度", 100));
		columns.add(new ColumnConfig(ICard.DESC, "贺卡描述", 400));
		ColumnConfig action = new ColumnConfig("", "操作", 100);
        columns.add(action);
        
        ColumnModel cm = new ColumnModel(columns);
        grid = new Grid<BeanObject>(store, cm);
        
        grid.setLoadMask(true);
        grid.setBorders(true);
        grid.setHeight(350);
        
        ActionCellRenderer render = new ActionCellRenderer(grid);
		ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
		act.setImage("icon_edit.gif");
		act.setAction("changeCard($id)");
		act.setTooltip("编辑");
		render.addAction(act);
		act = new ActionCellRenderer.ActionInfo();		
		act.setImage("icon_trash.gif");
		act.setAction("deleteCard($id)");
        act.setTooltip("删除");
        render.addAction(act);
        action.setRenderer(render);
        
        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);
        add(panel);
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:52,代码来源:CardListPanel.java


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