當前位置: 首頁>>代碼示例>>Java>>正文


Java RpcProxy類代碼示例

本文整理匯總了Java中com.sencha.gxt.data.client.loader.RpcProxy的典型用法代碼示例。如果您正苦於以下問題:Java RpcProxy類的具體用法?Java RpcProxy怎麽用?Java RpcProxy使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RpcProxy類屬於com.sencha.gxt.data.client.loader包,在下文中一共展示了RpcProxy類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getLoader

import com.sencha.gxt.data.client.loader.RpcProxy; //導入依賴的package包/類
private PagingLoader<FilterPagingLoadConfig, PagingLoadResult<TableModel>> getLoader() {
	if (loader == null) {
		RpcProxy<FilterPagingLoadConfig, PagingLoadResult<TableModel>> proxy = new RpcProxy<FilterPagingLoadConfig, PagingLoadResult<TableModel>>() {
			@Override
			public void load(FilterPagingLoadConfig loadConfig,
					AsyncCallback<PagingLoadResult<TableModel>> callback) {
				String dbname = dbNameText.getValue();
				if(dbname != null){
				tableService.getPagingTables(loadConfig, null, dbname, callback);
				}
			}
		};
		loader = new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<TableModel>>(
				proxy) {
			@Override
			protected FilterPagingLoadConfig newLoadConfig() {
				return new FilterPagingLoadConfigBean();
			}
		};
		loader.addLoadHandler(new LoadResultListStoreBinding<FilterPagingLoadConfig, TableModel, PagingLoadResult<TableModel>>(
				getCommonStore()));

		loader.setRemoteSort(true);

		loader.addLoadHandler(new LoadHandler<FilterPagingLoadConfig, PagingLoadResult<TableModel>>() {

			@Override
			public void onLoad(
					LoadEvent<FilterPagingLoadConfig, PagingLoadResult<TableModel>> event) {
				if (event.getLoadResult().getData().isEmpty())
					return;
				getTableInfoPanel().load(
						event.getLoadResult().getData().get(0));
			}

		});
	}
	return this.loader;
}
 
開發者ID:ctripcorp,項目名稱:dataworks-zeus,代碼行數:40,代碼來源:TableManagerViewImpl.java

示例2: getLoader

import com.sencha.gxt.data.client.loader.RpcProxy; //導入依賴的package包/類
private PagingLoader<FilterPagingLoadConfig, PagingLoadResult<TableModel>> getLoader() {
	if (loader == null) {
		RpcProxy<FilterPagingLoadConfig, PagingLoadResult<TableModel>> proxy = new RpcProxy<FilterPagingLoadConfig, PagingLoadResult<TableModel>>() {
			@Override
			public void load(FilterPagingLoadConfig loadConfig,
					AsyncCallback<PagingLoadResult<TableModel>> callback) {
				tableService.getPagingTables(loadConfig, null, callback);
			}
		};
		loader = new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<TableModel>>(
				proxy) {
			@Override
			protected FilterPagingLoadConfig newLoadConfig() {
				return new FilterPagingLoadConfigBean();
			}
		};
		loader.addLoadHandler(new LoadResultListStoreBinding<FilterPagingLoadConfig, TableModel, PagingLoadResult<TableModel>>(
				getCommonStore()));

		loader.setRemoteSort(true);

		loader.addLoadHandler(new LoadHandler<FilterPagingLoadConfig, PagingLoadResult<TableModel>>() {

			@Override
			public void onLoad(
					LoadEvent<FilterPagingLoadConfig, PagingLoadResult<TableModel>> event) {
				if (event.getLoadResult().getData().isEmpty())
					return;
				getTableInfoPanel().load(
						event.getLoadResult().getData().get(0));
			}

		});
	}
	return this.loader;
}
 
開發者ID:zogwei,項目名稱:zeus3,代碼行數:37,代碼來源:TableManagerViewImpl.java

示例3: HostGroupWindow

import com.sencha.gxt.data.client.loader.RpcProxy; //導入依賴的package包/類
public HostGroupWindow() {
	setHeadingText("host分組信息");
	setModal(true);
	setHeight(600);
	setWidth(500);
	container = new VerticalLayoutContainer();
	container.setHeight(300);
	container.setWidth(300);
	add(container);
	ColumnConfig<HostGroupModel, String> idColumn = new ColumnConfig<HostGroupModel, String>(
			props.id(), 30, "id");
	ColumnConfig<HostGroupModel, String> nameColumn = new ColumnConfig<HostGroupModel, String>(
			props.name(), 30, "組名");
	ColumnConfig<HostGroupModel, String> descriptionColumn = new ColumnConfig<HostGroupModel, String>(
			props.description(), 60, "描述");
	ColumnModel<HostGroupModel> cm = new ColumnModel(Arrays.asList(
			idColumn, nameColumn, descriptionColumn));

	store = new ListStore<HostGroupModel>(
			new ModelKeyProvider<HostGroupModel>() {
				@Override
				public String getKey(HostGroupModel item) {
					return String.valueOf(item.getId());
				}
			});

	RpcProxy<PagingLoadConfig, PagingLoadResult<HostGroupModel>> proxy = new RpcProxy<PagingLoadConfig, PagingLoadResult<HostGroupModel>>() {

		@Override
		public void load(
				PagingLoadConfig loadConfig,
				final AsyncCallback<PagingLoadResult<HostGroupModel>> callback) {
			RPCS.getJobService().getHostGroup(loadConfig, callback);
		}
	};

	loader = new PagingLoader<PagingLoadConfig, PagingLoadResult<HostGroupModel>>(
			proxy);
	loader.setLimit(20);
	loader.addLoadHandler(new LoadResultListStoreBinding<PagingLoadConfig, HostGroupModel, PagingLoadResult<HostGroupModel>>(
			store));
	grid = new Grid<HostGroupModel>(store, cm);
	grid.setLoader(loader);
	grid.setLoadMask(true);
	grid.getView().setForceFit(true);

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

	container.add(grid,new VerticalLayoutData(1, 1));
	container.add(toolBar,new VerticalLayoutData(1, 30));
	
	addButton(new TextButton("確定", new SelectHandler() {
		@Override
		public void onSelect(SelectEvent event) {
			if (handler != null) {
				handler.onSelect(event);
			}
		}
	}));
	refresh();
}
 
開發者ID:ctripcorp,項目名稱:dataworks-zeus,代碼行數:63,代碼來源:HostGroupWindow.java


注:本文中的com.sencha.gxt.data.client.loader.RpcProxy類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。