• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java CheckGroupSelector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.wicket.markup.html.form.CheckGroupSelector的典型用法代码示例。如果您正苦于以下问题:Java CheckGroupSelector类的具体用法?Java CheckGroupSelector怎么用?Java CheckGroupSelector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CheckGroupSelector类属于org.apache.wicket.markup.html.form包,在下文中一共展示了CheckGroupSelector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onConfigure

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
@Override
protected void onConfigure() {
	super.onConfigure();
	checkGroup = newCheckGroup();
	checkGroupSelector = new CheckGroupSelector("entityGroupSelector", checkGroup);
	provider.setMaximumNoOfEntities(maxEntitiesToShow);
	dataView = new DataView<Entity>("entities", provider) {
		@Override
		protected void populateItem(Item<Entity> item
		) {
			Check<Entity> check = new Check<>("check", item.getModel(), checkGroup);
			check.setVisible(isSelectionEnabled());
			item.add(check);
			LdapEntityListPanel.this.populateItem(item, check);
		}
	};
	tableContainer = new WebMarkupContainer("tableContainer");
	tableContainer.addOrReplace(dataView);
	listHeader = new WebMarkupContainer("listHeader");
	listHeader.addOrReplace(checkGroupSelector);
	tableContainer.addOrReplace(listHeader);
	tableContainer.addOrReplace(new Label("javascript", headerFixed ? getJavaScript() : "").setEscapeModelStrings(false));
	checkGroup.addOrReplace(tableContainer.setOutputMarkupId(true));
	addOrReplace(checkGroup);

	checkGroupSelector.setVisible(this.selectionEnabled);
	tableContainer.setVisible(dataView.getItemCount() > 0);
	if (!StringUtils.isEmpty(getContainerCSSClass())) {
		tableContainer.add(new AttributeAppender("class", getContainerCSSClass()));
	}
	if (!StringUtils.isEmpty(getContainerCSSClass())) {
		listHeader.add(new AttributeAppender("class", getListHeaderCSSClass()));
	}
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:35,代码来源:LdapEntityListPanel.java


示例2: CheckBoxHeaderPanel

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
public CheckBoxHeaderPanel(String id) {
    super(id);
    
    CheckGroupSelector selector = new CheckGroupSelector("groupselector");
    group.add(selector);
    add(selector);
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:8,代码来源:RecipientsPanel.java


示例3: TeamListPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
public TeamListPage(final PageParameters pageParameters) {
	super(pageParameters);

	if (!pageParameters.get("id").isEmpty()) {
		project = projectService.getById(pageParameters.get("id").toLong());
		if (project == null) {
			throw new EntityNotFoundException(Team.class, pageParameters.get("id").toOptionalString());
		}
	}

	Form<Void> form = new Form("form");
	provider = new TeamEntityProvider();
	DataView<Team> usersView = new DataView<Team>("teams", provider, itemsPerPage) {
		@Override
		protected void populateItem(Item<Team> item) {
			final Team team = item.getModelObject();
			item.add(new Check<>("teamCheck", item.getModel(), teamGroup));
			BookmarkablePageLink<TeamEditPage> editTeam = new BookmarkablePageLink<>("link.edit.team", TeamEditPage.class, new PageParameters().add("id", team.getId()));
			item.add(editTeam.add(new Label("td.teamname", new PropertyModel<>(team, "name"))));
			item.add(new Label("td.description", new PropertyModel<>(team, "description")));
			item.add(newMembersPanel(team));
			Link editButton = new BookmarkablePageLink("button.edit", TeamEditPage.class, new PageParameters().add("id", team.getId()));
			item.add(editButton);
			item.setOutputMarkupId(true);
		}
	};
	form.add(teamGroup = newCheckGroup());
	teamsContainer = new WebMarkupContainer("teamsContainer");
	teamGroup.add(teamsContainer.setOutputMarkupId(true));
	CheckGroupSelector checkGroupSelector = new CheckGroupSelector("teamGroupSelector", teamGroup);
	teamsContainer.add(checkGroupSelector);
	teamsContainer.add(usersView);
	teamsContainer.add(deleteSelectedButton = newDeleteSelectedButton(teamGroup));
	teamsContainer.add(addSelectedButton = addteamButton(teamGroup));
	BookmarkablePageLink<TeamEditPage> createTeam = new BookmarkablePageLink<>("link.create.team", TeamEditPage.class);
	teamsContainer.add(createTeam);
	add(form);

	teamsContainer.add(navigator = new BootstrapAjaxPagingNavigator(
			"navigatorFoot", usersView));

	allProjects = treeNodeService.getAllProjects();

	// add confirmation modal for deleting items, and adding team to a project
	add(deleteConfirmationModal = newDeleteConfirmationModal());
	add(addConfirmationModal = newAddConfirmationModal());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:48,代码来源:TeamListPage.java


示例4: HistoricProjectPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
/**
	 * Constructor building the page
	 *
	 * @param parameters
	 */
	public HistoricProjectPage(final PageParameters parameters) {

		super(parameters);
		
		// TODO: I dont know why this does not work???
//		String key = getPageParameters().get("project-key").toOptionalString();
		project = treeNodeService.getTreeNodeByKey("U-QASAR");
		projectId = project.getId();
		
		add(new Label("metricName", project.getName()));
		
		final Form<AbstractHistoricValues> deleteForm = new Form<>("deleteForm");
		add(deleteForm);

		// add checkgroup for selecting multiple measurements
		deleteForm.add(dataGroup = newDataCheckGroup());

		// add the container holding list of existing measurements
		dataGroup.add(dataContainer.setOutputMarkupId(true));

		dataContainer.add(new CheckGroupSelector(
				"dataGroupSelector", dataGroup));

		DataView<AbstractHistoricValues> dataMeasurements = new DataView<AbstractHistoricValues>(
				"dataMeasurements", new DataProvider(), itemsPerPage) {

		private static final long serialVersionUID = 7687248000895943825L;

			@Override
			protected void populateItem(final Item<AbstractHistoricValues> item) {
				final AbstractHistoricValues historicDataMeasurement = item.getModelObject();

				item.add(new Check<>("dataCheck", item
						.getModel(), dataGroup));
	
				item.add(new Label ("value", new PropertyModel<String>(
						historicDataMeasurement, "value")));

				item.add(new Label ("lowerAcceptanceLimit", new PropertyModel<String>(
						historicDataMeasurement, "lowerAcceptanceLimit")));
				
				item.add(new Label("upperAcceptanceLimit", new PropertyModel<String>(
						historicDataMeasurement, "upperAcceptanceLimit")));

				item.add(new Label("timeStamp", new PropertyModel<Date>(
						historicDataMeasurement, "date")));
				
			}
		};
		dataContainer.add(dataMeasurements);
		
		// Add graphical representation of the values
		dataContainer.add(historicChart = historicChart());
		
		// add links for table pagination
		dataContainer.add(new BootstrapAjaxPagingNavigator(
				"navigatorHead", dataMeasurements));
		dataContainer.add(new BootstrapAjaxPagingNavigator(
				"navigatorFoot", dataMeasurements));

		// add button to delete selected items
		dataContainer
		.add(deleteSelectedButton = newDeleteSelectedButton(dataGroup));

		// add confirmation modal for deleting products
		add(deleteConfirmationModal = newDeleteConfirmationModal());
		
	}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:74,代码来源:HistoricProjectPage.java


示例5: HistoricBaseIndicatorPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
/**
 * Constructor building the page
 *
 * @param parameters
 */
public HistoricBaseIndicatorPage(final PageParameters parameters) {

	super(parameters);
	
	// set the Base indicator
	baseIndicatorId = parameters.get("id").toOptionalLong();
	baseIndicator = historicalService.getBaseIndicatorById(baseIndicatorId);
	
	add(new Label("metricName", baseIndicator.getName()));
	
	final Form<AbstractHistoricValues> deleteForm = new Form<>("deleteForm");
	add(deleteForm);

	// add checkgroup for selecting multiple measurements
	deleteForm.add(dataGroup = newDataCheckGroup());

	// add the container holding list of existing measurements
	dataGroup.add(dataContainer.setOutputMarkupId(true));

	dataContainer.add(new CheckGroupSelector(
			"dataGroupSelector", dataGroup));

	DataView<AbstractHistoricValues> dataMeasurements = new DataView<AbstractHistoricValues>(
			"dataMeasurements", new DataProvider(), itemsPerPage) {

	private static final long serialVersionUID = 7687248000895943825L;

		@Override
		protected void populateItem(final Item<AbstractHistoricValues> item) {
			final AbstractHistoricValues historicDataMeasurement = item.getModelObject();

			item.add(new Check<>("dataCheck", item
					.getModel(), dataGroup));

			item.add(new Label ("value", new PropertyModel<String>(
					historicDataMeasurement, "value")));

			item.add(new Label ("targetValue", new PropertyModel<String>(
					historicDataMeasurement, "targetValue")));

			item.add(new Label ("lowerAcceptanceLimit", new PropertyModel<String>(
					historicDataMeasurement, "lowerAcceptanceLimit")));
			
			item.add(new Label("upperAcceptanceLimit", new PropertyModel<String>(
					historicDataMeasurement, "upperAcceptanceLimit")));

			item.add(new Label("weight", new PropertyModel<String>(
					historicDataMeasurement, "weight")));

			item.add(new Label("timeStamp", new PropertyModel<Date>(
					historicDataMeasurement, "date")));
			
		}
	};
	dataContainer.add(dataMeasurements);

	// Add graphical representation of the values
	dataContainer.add(historicChart = historicChart());
	
	// add links for table pagination
	dataContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorHead", dataMeasurements));
	dataContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorFoot", dataMeasurements));

	// add button to delete selected items
	dataContainer
	.add(deleteSelectedButton = newDeleteSelectedButton(dataGroup));

	// add confirmation modal for deleting products
	add(deleteConfirmationModal = newDeleteConfirmationModal());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:78,代码来源:HistoricBaseIndicatorPage.java


示例6: GitlabDataManagementPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
/**
 * Constructor building the page
 *
 * @param parameters
 */
public GitlabDataManagementPage(final PageParameters parameters) {

	super(parameters);
	
	Long adapterId = parameters.get("id").toLongObject();
	
	final Form<GitlabMetricMeasurement> deleteForm = new Form<>("deleteForm");
	add(deleteForm);

	// add checkgroup for selecting multiple products
	deleteForm.add(gitlabGroup = newGitlabCheckGroup());

	// add the container holding list of existing products
	gitlabGroup.add(gitlabContainer.setOutputMarkupId(true));

	gitlabContainer.add(new CheckGroupSelector(
			"gitlabGroupSelector", gitlabGroup));

	DataView<GitlabMetricMeasurement> gitlabMeasurements = new DataView<GitlabMetricMeasurement>(
			"gitlabMeasurements", new GitlabProvider(adapterId), itemsPerPage) {


				@Override
				protected void populateItem(final Item<GitlabMetricMeasurement> item) {
					final GitlabMetricMeasurement gitlabMetricMeasurement = item.getModelObject();

					item.add(new Check<>("gitlabCheck", item
							.getModel(), gitlabGroup));

					item.add(new Label("name", new PropertyModel<String>(
							gitlabMetricMeasurement, "name")));

					item.add(new Label("metric", new PropertyModel<String>(
							gitlabMetricMeasurement, "gitlabMetric")));
					
					item.add(new Label("value", new PropertyModel<String>(
							gitlabMetricMeasurement, "value")));

					item.add(new Label("timeStamp", new PropertyModel<Date>(
							gitlabMetricMeasurement, "timeStamp")));
				}
			};
	gitlabContainer.add(gitlabMeasurements);

	// add links for table pagination
	gitlabContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorHead", gitlabMeasurements));
	gitlabContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorFoot", gitlabMeasurements));

	// add button to delete selected items
	gitlabContainer
			.add(deleteSelectedButton = newDeleteSelectedButton(gitlabGroup));

	// add confirmation modal for deleting products
	add(deleteConfirmationModal = newDeleteConfirmationModal());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:63,代码来源:GitlabDataManagementPage.java


示例7: IssueTrackerDataManagementPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
/**
 * Constructor building the page
 *
 * @param parameters
 */
public IssueTrackerDataManagementPage(final PageParameters parameters) {

	super(parameters);
	
	Long adapterId = parameters.get("id").toLongObject();

	final Form<JiraMetricMeasurement> deleteForm = new Form<>("deleteForm");
	add(deleteForm);

	// add checkgroup for selecting multiple measurements
	deleteForm.add(jiraGroup = newJiraCheckGroup());

	// add the container holding list of existing measurements
	jiraGroup.add(jiraContainer.setOutputMarkupId(true));

	jiraContainer.add(new CheckGroupSelector(
			"jiraGroupSelector", jiraGroup));

	DataView<JiraMetricMeasurement> jiraMeasurements = new DataView<JiraMetricMeasurement>(
			"jiraMeasurements", new JiraProvider(adapterId), itemsPerPage) {

		private static final long serialVersionUID = -2997007102890828835L;

		@Override
		protected void populateItem(final Item<JiraMetricMeasurement> item) {
			final JiraMetricMeasurement jiraMetricMeasurement = item.getModelObject();

			item.add(new Check<>("jiraCheck", item
					.getModel(), jiraGroup));

			item.add(new Label("key", new PropertyModel<String>(
					jiraMetricMeasurement, "jiraKey")));

			item.add(new Label("self", new PropertyModel<String>(
					jiraMetricMeasurement, "self")));

			item.add(new Label("jiraMetric", new PropertyModel<String>(
					jiraMetricMeasurement, "jiraMetric")));

			item.add(new Label("jsonContent", new PropertyModel<String>(
					jiraMetricMeasurement, "jsonContent")));

			item.add(new Label("timeStamp", new PropertyModel<Date>(
					jiraMetricMeasurement, "timeStamp")));
					
			// add button to show AddEditPage
               item.add(new BookmarkablePageLink<IssueTrackerDataManagementEditPage>(
                       "edit", IssueTrackerDataManagementEditPage.class,
                       forTableEntity(jiraMetricMeasurement,parameters)));		
		}
	};
	jiraContainer.add(jiraMeasurements);

	// add links for table pagination
	jiraContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorHead", jiraMeasurements));
	jiraContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorFoot", jiraMeasurements));

	// add button to delete selected items
	jiraContainer
	.add(deleteSelectedButton = newDeleteSelectedButton(jiraGroup));

	// add confirmation modal for deleting products
	add(deleteConfirmationModal = newDeleteConfirmationModal());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:72,代码来源:IssueTrackerDataManagementPage.java


示例8: TestFrameworkDataManagementPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
/**
 * Constructor building the page
 *
 * @param parameters
 */
public TestFrameworkDataManagementPage(final PageParameters parameters) {
	super(parameters);

	Long adapterId = parameters.get("id").toLongObject();
	
	final Form<TestLinkMetricMeasurement> deleteForm = new Form<>("deleteForm");
	add(deleteForm);

	// add checkgroup for selecting multiple products
	deleteForm.add(testLinkGroup = newTestLinkCheckGroup());

	// add the container holding list of existing products
	testLinkGroup.add(testLinkContainer.setOutputMarkupId(true));

	testLinkContainer.add(new CheckGroupSelector(
			"testLinkGroupSelector", testLinkGroup));

	DataView<TestLinkMetricMeasurement> testLinkMeasurements = new DataView<TestLinkMetricMeasurement>(
			"testLinkMeasurements", new TestLinkProvider(adapterId), itemsPerPage) {


				/**
				 * 
				 */
				private static final long serialVersionUID = -4323485288017314459L;

				@Override
				protected void populateItem(final Item<TestLinkMetricMeasurement> item) {
					final TestLinkMetricMeasurement testLinkMetricMeasurement = item.getModelObject();

					item.add(new Check<>("testLinkCheck", item
							.getModel(), testLinkGroup));

					item.add(new Label("name", new PropertyModel<String>(
							testLinkMetricMeasurement, "name")));

					item.add(new Label("key", new PropertyModel<String>(
							testLinkMetricMeasurement, "testLinkKey")));

					item.add(new Label("metric", new PropertyModel<String>(
							testLinkMetricMeasurement, "testLinkMetric")));
					
					item.add(new Label("value", new PropertyModel<String>(
							testLinkMetricMeasurement, "value")));

					item.add(new Label("timeStamp", new PropertyModel<Date>(
							testLinkMetricMeasurement, "timeStamp")));
							
					// add button to show AddEditPage
	                item.add(new BookmarkablePageLink<TestFrameworkDataManagementEditPage>(
	                        "edit", TestFrameworkDataManagementEditPage.class,
	                        forTableEntity(testLinkMetricMeasurement,parameters)));
							
				}
			};
	testLinkContainer.add(testLinkMeasurements);

	// add links for table pagination
	testLinkContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorHead", testLinkMeasurements));
	testLinkContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorFoot", testLinkMeasurements));

	// add button to delete selected items
	testLinkContainer
			.add(deleteSelectedButton = newDeleteSelectedButton(testLinkGroup));

	// add confirmation modal for deleting products
	add(deleteConfirmationModal = newDeleteConfirmationModal());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:76,代码来源:TestFrameworkDataManagementPage.java


示例9: JenkinsDataManagementPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
/**
 * Constructor building the page
 *
 * @param parameters
 */
public JenkinsDataManagementPage(final PageParameters parameters) {

	super(parameters);
	
	Long adapterId = parameters.get("id").toLongObject();
	
	final Form<JenkinsMetricMeasurement> deleteForm = new Form<>("deleteForm");
	add(deleteForm);

	// add checkgroup for selecting multiple products
	deleteForm.add(jenkinsGroup = newJenkinsCheckGroup());

	// add the container holding list of existing products
	jenkinsGroup.add(jenkinsContainer.setOutputMarkupId(true));

	jenkinsContainer.add(new CheckGroupSelector(
			"jenkinsGroupSelector", jenkinsGroup));

	DataView<JenkinsMetricMeasurement> jenkinsMeasurements = new DataView<JenkinsMetricMeasurement>(
			"jenkinsMeasurements", new JenkinsProvider(adapterId), itemsPerPage) {


				@Override
				protected void populateItem(final Item<JenkinsMetricMeasurement> item) {
					final JenkinsMetricMeasurement jenkinsMetricMeasurement = item.getModelObject();

					item.add(new Check<>("jenkinsCheck", item
							.getModel(), jenkinsGroup));

					item.add(new Label("name", new PropertyModel<String>(
							jenkinsMetricMeasurement, "name")));

					item.add(new Label("metric", new PropertyModel<String>(
							jenkinsMetricMeasurement, "jenkinsMetric")));
					
					item.add(new Label("value", new PropertyModel<String>(
							jenkinsMetricMeasurement, "value")));

					item.add(new Label("timeStamp", new PropertyModel<Date>(
							jenkinsMetricMeasurement, "timeStamp")));
					
					// add button to show AddEditPage
	                item.add(new BookmarkablePageLink<JenkinsDataManagementEditPage>(
	                        "edit", JenkinsDataManagementEditPage.class,
	                        forTableEntity(jenkinsMetricMeasurement,parameters)));
							
				}
			};
	jenkinsContainer.add(jenkinsMeasurements);

	// add links for table pagination
	jenkinsContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorHead", jenkinsMeasurements));
	jenkinsContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorFoot", jenkinsMeasurements));

	// add button to delete selected items
	jenkinsContainer
			.add(deleteSelectedButton = newDeleteSelectedButton(jenkinsGroup));

	// add confirmation modal for deleting products
	add(deleteConfirmationModal = newDeleteConfirmationModal());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:69,代码来源:JenkinsDataManagementPage.java


示例10: CubeAnalysisDataManagementPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
/**
 * Constructor building the page
 *
 * @param parameters
 */
public CubeAnalysisDataManagementPage(final PageParameters parameters) {

	super(parameters);
	
	Long adapterId = parameters.get("id").toLongObject();

	final Form<CubesMetricMeasurement> deleteForm = new Form<>("deleteForm");
	add(deleteForm);

	// add checkgroup for selecting multiple measurements
	deleteForm.add(cubesGroup = newCubesCheckGroup());

	// add the container holding list of existing measurements
	cubesGroup.add(cubesContainer.setOutputMarkupId(true));

	cubesContainer.add(new CheckGroupSelector(
			"cubesGroupSelector", cubesGroup));

	DataView<CubesMetricMeasurement> cubesMeasurements = new DataView<CubesMetricMeasurement>(
			"cubesMeasurements", new CubesProvider(adapterId), itemsPerPage) {


	private static final long serialVersionUID = 7687248000895943825L;

		@Override
		protected void populateItem(final Item<CubesMetricMeasurement> item) {
			final CubesMetricMeasurement cubesMetricMeasurement = item.getModelObject();

			item.add(new Check<>("cubesCheck", item.getModel(), cubesGroup));

			item.add(linkCubesQuery(cubesMetricMeasurement));

			item.add(new Label("value", new PropertyModel<String>(
					cubesMetricMeasurement, "value")));

			item.add(new Label("jsonContent", new PropertyModel<String>(
					cubesMetricMeasurement, "jsonContent")));

			item.add(new Label("timeStamp", new PropertyModel<Date>(
					cubesMetricMeasurement, "timeStamp")));
			
			// add button to show AddEditPage
               item.add(new BookmarkablePageLink<CubeAnalysisDataManagementEditPage>(
                       "edit", CubeAnalysisDataManagementEditPage.class,
                       forTableEntity(cubesMetricMeasurement,parameters)));
		}
	};
	cubesContainer.add(cubesMeasurements);

	// add links for table pagination
	cubesContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorHead", cubesMeasurements));
	cubesContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorFoot", cubesMeasurements));

	// add button to delete selected items
	cubesContainer
	.add(deleteSelectedButton = newDeleteSelectedButton(cubesGroup));

	// add confirmation modal for deleting items
	add(deleteConfirmationModal = newDeleteConfirmationModal());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:68,代码来源:CubeAnalysisDataManagementPage.java


示例11: StaticAnalysisDataManagementPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
/**
 * Constructor building the page
 *
 * @param parameters
 */
public StaticAnalysisDataManagementPage(final PageParameters parameters) {

	super(parameters);
	
	Long adapterId = parameters.get("id").toLongObject();
	
	final Form<SonarMetricMeasurement> deleteForm = new Form<>("deleteForm");
	add(deleteForm);

	// add checkgroup for selecting multiple products
	deleteForm.add(sonarGroup = newSonarCheckGroup());

	// add the container holding list of existing products
	sonarGroup.add(sonarContainer.setOutputMarkupId(true));

	sonarContainer.add(new CheckGroupSelector(
			"sonarGroupSelector", sonarGroup));

	DataView<SonarMetricMeasurement> sonarMeasurements = new DataView<SonarMetricMeasurement>(
			"sonarMeasurements", new SonarProvider(adapterId), itemsPerPage) {

				private static final long serialVersionUID = -392205969465703229L;

				@Override
				protected void populateItem(final Item<SonarMetricMeasurement> item) {
					final SonarMetricMeasurement sonarMetricMeasurement = item.getModelObject();

					item.add(new Check<>("sonarCheck", item
							.getModel(), sonarGroup));

					item.add(new Label("name", new PropertyModel<String>(
							sonarMetricMeasurement, "name")));

					item.add(new Label("key", new PropertyModel<String>(
							sonarMetricMeasurement, "sonarKey")));

					item.add(new Label("metric", new PropertyModel<String>(
							sonarMetricMeasurement, "sonarMetric")));
					
					item.add(new Label("value", new PropertyModel<String>(
							sonarMetricMeasurement, "value")));

					item.add(new Label("timeStamp", new PropertyModel<Date>(
							sonarMetricMeasurement, "timeStamp")));
							
					// add button to show AddEditPage
	                item.add(new BookmarkablePageLink<StaticAnalysisDataManagementEditPage>(
	                        "edit", StaticAnalysisDataManagementEditPage.class,
	                        forTableEntity(sonarMetricMeasurement,parameters)));
							
				}
			};
	sonarContainer.add(sonarMeasurements);

	// add links for table pagination
	sonarContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorHead", sonarMeasurements));
	sonarContainer.add(new BootstrapAjaxPagingNavigator(
			"navigatorFoot", sonarMeasurements));

	// add button to delete selected items
	sonarContainer
			.add(deleteSelectedButton = newDeleteSelectedButton(sonarGroup));

	// add confirmation modal for deleting products
	add(deleteConfirmationModal = newDeleteConfirmationModal());
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:73,代码来源:StaticAnalysisDataManagementPage.java


示例12: CheckBoxGroupSelectorPanel

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
public CheckBoxGroupSelectorPanel(final String componentId, final CheckGroup<T> group) {

        super(componentId);
        add(new CheckGroupSelector("groupselector", group));
    }
 
开发者ID:apache,项目名称:syncope,代码行数:6,代码来源:CheckBoxGroupSelectorPanel.java


示例13: newRowItem

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model) {
    final OddEvenItem<T> item = new OddEvenItem<>(id, index, model);

    if (togglePanel != null) {
        final ActionsPanel<T> actions = getActions(model);

        if (actions != null && !actions.isEmpty()) {
            item.add(new AttributeModifier("style", "cursor: pointer;"));
            item.add(new AjaxEventBehavior(Constants.ON_CLICK) {

                private static final long serialVersionUID = 1L;

                @Override
                protected String findIndicatorId() {
                    return StringUtils.EMPTY;
                }

                @Override
                protected void onEvent(final AjaxRequestTarget target) {
                    final String lastFocussedElementId = target.getLastFocusedElementId();
                    if (lastFocussedElementId == null) {
                        togglePanel.toggleWithContent(target, getActions(model), model.getObject());
                    } else {
                        final AjaxDataTablePanel<?, ?> parent = findParent(AjaxDataTablePanel.class);
                        final Model<Boolean> isCheck = Model.<Boolean>of(Boolean.FALSE);

                        parent.visitChildren(CheckGroupSelector.class, (selector, ivisit) -> {
                            if (selector.getMarkupId().equalsIgnoreCase(lastFocussedElementId)) {
                                isCheck.setObject(Boolean.TRUE);
                                ivisit.stop();
                            }
                        });

                        if (!isCheck.getObject()) {
                            parent.visitChildren(Check.class, (check, ivisit) -> {
                                if (check.getMarkupId().equalsIgnoreCase(lastFocussedElementId)) {
                                    isCheck.setObject(Boolean.TRUE);
                                    ivisit.stop();
                                }
                            });
                        }

                        if (!isCheck.getObject()) {
                            togglePanel.toggleWithContent(target, getActions(model), model.getObject());
                        }
                    }
                }
            });
        }
    }

    return item;
}
 
开发者ID:apache,项目名称:syncope,代码行数:55,代码来源:AjaxFallbackDataTable.java


示例14: CheckBoxHeaderPanel

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
public CheckBoxHeaderPanel(String id) {
	super(id);
	CheckGroupSelector selector = new CheckGroupSelector("groupselector");
	group.add(selector);
	add(selector);
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:7,代码来源:RunHistoryPanel.java


示例15: PlatformSettingsPage

import org.apache.wicket.markup.html.form.CheckGroupSelector; //导入依赖的package包/类
public PlatformSettingsPage(PageParameters pageParameters) {
    super(pageParameters);

    final Form<PlatformSettings> form = new Form<>("form");
    add(form);

    // add checkgroup for selecting multiple project-settings
    form.add(settingsGroup = newAdapterSettingsCheckGroup());

    container = new WebMarkupContainer("container", new Model<PlatformSettings>());
    // add the container holding list of existing products
    settingsGroup.add(container.setOutputMarkupId(true));

    container.add(new CheckGroupSelector("adapterGroupSelector", settingsGroup));

    DataView<PlatformSettings> settingsView = new DataView<PlatformSettings>("adapters",
        new ProjectSettingsProvider(), itemsPerPage) {

        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(final Item<PlatformSettings> item) {

            final PlatformSettings proposedProjectSetting = item.getModelObject();

            item.add(new Check<>("adapterCheck", item.getModel(), settingsGroup));

            item.add(new Label("settingKey", new PropertyModel<String>(proposedProjectSetting, "settingKey")));

            item.add(new Label("settingValue", new PropertyModel<String>(proposedProjectSetting, "settingValue")));

            // add button to show AddEditPage
            item.add(new BookmarkablePageLink<PlatformSettingsAddEditPage>("edit", PlatformSettingsAddEditPage.class,
                forSetting(proposedProjectSetting)));

        }

    };

    // add list of adapters to container
    container.add(settingsView);

    // add button to new adapter settings
    container.add(new BookmarkablePageLink<PlatformSettingsAddEditPage>("addAdapterLink", PlatformSettingsAddEditPage.class));

    // add links for table pagination
    container.add(new BootstrapAjaxPagingNavigator("navigatorHead", settingsView));
    container.add(new BootstrapAjaxPagingNavigator("navigatorFoot", settingsView));
    // add button to delete selected adapters
    container.add(deleteSelectedButton = newDeleteSelectedButton(settingsGroup));

    // add confirmation modal for deleting settings
    add(deleteConfirmationModal = newDeleteConfirmationModal());

    form1 = new Form<Void>("form1") {

        @Override
        protected void onSubmit() {
            settingsService.create(new PlatformSettings(settings.getSettingKey(), settings.getSettingValue()));
            keyField.setModelObject(null);
            valueField.setModelObject(null);
        }
    };

    keyField = new TextField<>("keyField", new PropertyModel<String>(settings, "settingKey"));
    keyField.setRequired(true);
    form1.add(keyField);

    valueField = new TextField<>("valueField", new PropertyModel<String>(settings, "settingValue"));
    valueField.setRequired(true);
    form1.add(valueField);

    add(form);
    add(form1);
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:76,代码来源:PlatformSettingsPage.java



注:本文中的org.apache.wicket.markup.html.form.CheckGroupSelector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EnterOptionsDialog类代码示例发布时间:2022-05-22
下一篇:
Java PsiSuperMethodImplUtil类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap