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


Java DropDownChoice类代码示例

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


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

示例1: addExcludesPatternFields

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private void addExcludesPatternFields(StringResourceModel helpMessage,
        final List<CommonPathPattern> includesExcludesSuggestions) {
    TextArea excludesTa = new TextArea("excludesPattern");
    excludesTa.setEnabled(isSystemAdmin());
    excludesTa.setOutputMarkupId(true);
    add(excludesTa);

    add(new HelpBubble("excludesHelp", helpMessage));

    //Excludes suggestions
    Model<CommonPathPattern> exclude = new Model<>();
    DropDownChoice<CommonPathPattern> excludesSuggest = new DropDownChoice<>(
            "excludesSuggest", exclude, includesExcludesSuggestions);
    if (!includesExcludesSuggestions.isEmpty()) {
        excludesSuggest.setDefaultModelObject(includesExcludesSuggestions.get(0));
    }
    excludesSuggest.add(new UpdatePatternsBehavior(exclude, excludesTa));
    excludesSuggest.setEnabled(isSystemAdmin());
    add(excludesSuggest);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:21,代码来源:RepositoriesTabPanel.java

示例2: loadNavbar

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
/**
 * generates the navbar and mark the active page
 *
 * @param activePage page to be marked active (null for no active page)
 */
private void loadNavbar(final PageType activePage) {
    // add an entry for each page type
    add(new ListView<PageType>("navbar_left_elements", Arrays.asList(PageType.values())) {
        @Override
        protected void populateItem(final ListItem<PageType> item) {
            final PageType type = item.getModelObject();
            // create a link for the page type
            BookmarkablePageLink<String> link = new BookmarkablePageLink<>("navbar_left_element_link", type.getPageClass());
            link.add(new Label("navbar_left_element_text", type.getLinkText()));
            // if the type is same as active page, mark it as active
            if (type.equals(activePage)) link.add(new AttributeAppender("class", "active", " "));
            item.add(link);
        }
    });

    // create the summoner search region drop down menu
    // get all valid entries
    List<String> endpoints = Arrays.asList(RiotEndpoint.PLAYABLE_ENDPOINTS)
            .stream().map(RiotEndpoint::name).collect(Collectors.toList());
    // add the options to the drop down menu
    DropDownChoice<String> dropDownChoice = new DropDownChoice<>("navbar_form_regions_select",
            new PropertyModel<>(this, "selectedRegion"), endpoints, new StringChoiceRenderer());
    dropDownChoice.add(new AttributeModifier("name", "region"));
    add(dropDownChoice);
}
 
开发者ID:LogicalOverflow,项目名称:MasterStats,代码行数:31,代码来源:BasePage.java

示例3: initViewSelector

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private void initViewSelector(WebMarkupContainer headerPanel){
    DropDownChoice<AssignmentViewType> viewSelect = new DropDownChoice(ID_VIEW_TYPE, viewModel,
            Model.ofList(viewTypeList != null && viewTypeList.size() > 0 ?
                    viewTypeList : createAssignableTypesList()),
            new EnumChoiceRenderer<AssignmentViewType>(this));
    viewSelect.add(new OnChangeAjaxBehavior() {
        private static final long serialVersionUID = 1L;

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            if (AssignmentViewType.USER_TYPE.equals(viewSelect.getModelObject())){
                initUserViewSelectionPopup(createStringResource("AssignmentCatalogPanel.selectAssignmentsUserOwner"),
                        target);
            } else {
                searchModel.reset();
                AssignmentCatalogPanel.this.addOrReplaceSearchPanel(getHeaderPanel());
                AssignmentCatalogPanel.this.addOrReplaceLayout(target, getCatalogItemsPanelContainer(), getPageBase());
                target.add(getCatalogItemsPanelContainer());
                target.add(getHeaderPanel());
            }
        }
    });
    viewSelect.setOutputMarkupId(true);
    headerPanel.add(viewSelect);

}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:27,代码来源:AssignmentCatalogPanel.java

示例4: createContentQuery

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
@Override
protected ObjectQuery createContentQuery() {
	String oid = getModelObject().getOid();

	DropDownChoice<String> searchScopeChoice = (DropDownChoice<String>) get(
			createComponentPath(ID_FORM, ID_SEARCH_SCOPE));
	String scope = searchScopeChoice.getModelObject();

	ObjectTypes searchType = getSearchType();
	S_FilterEntryOrEmpty q = QueryBuilder.queryFor(ObjectType.class, getPageBase().getPrismContext());
	if (!searchType.equals(ObjectTypes.OBJECT)) {
		q = q.type(searchType.getClassDefinition());
	}
	ObjectQuery query;
	if (SEARCH_SCOPE_ONE.equals(scope)) {
		query = q.isDirectChildOf(oid).build();
	} else {
		query = q.isChildOf(oid).build();
	}
	if (LOGGER.isTraceEnabled()) {
		LOGGER.trace("Searching members of org {} with query:\n{}", oid, query.debugDump());
	}
	return query;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:25,代码来源:OrgMemberPanel.java

示例5: initRoot

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private void initRoot() {
    DropDownChoice<LoggingLevelType> rootLevel = new DropDownChoice<>(ID_ROOT_LEVEL,
            new PropertyModel<LoggingLevelType>(getModel(), LoggingDto.F_ROOT_LEVEL),
            WebComponentUtil.createReadonlyModelFromEnum(LoggingLevelType.class));
    rootLevel.add(new EmptyOnChangeAjaxFormUpdatingBehavior());
    add(rootLevel);

    DropDownChoice<String> rootAppender = new DropDownChoice<>(ID_ROOT_APPENDER,
            new PropertyModel<String>(getModel(), LoggingDto.F_ROOT_APPENDER), createAppendersListModel());
    rootAppender.setNullValid(true);
    rootAppender.add(new OnChangeAjaxBehavior() {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            rootAppenderChangePerformed(target);
        }
    });
    rootAppender.add(new EmptyOnChangeAjaxFormUpdatingBehavior());
    add(rootAppender);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:21,代码来源:LoggingConfigPanel.java

示例6: initAudit

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private void initAudit(){
    CheckBox auditLog = WebComponentUtil.createAjaxCheckBox("auditLog", new PropertyModel<Boolean>(getModel(), "auditLog"));
    add(auditLog);

    CheckBox auditDetails = WebComponentUtil.createAjaxCheckBox("auditDetails", new PropertyModel<Boolean>(getModel(), "auditDetails"));
    add(auditDetails);

    DropDownChoice<String> auditAppender = new DropDownChoice<>("auditAppender", new PropertyModel<String>(
            getModel(), "auditAppender"), createAppendersListModel());
    auditAppender.setNullValid(true);
    auditAppender.add(new EmptyOnChangeAjaxFormUpdatingBehavior());
    add(auditAppender);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:14,代码来源:LoggingConfigPanel.java

示例7: createDropDown

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private <V> DropDownChoice<V> createDropDown(String id, IModel<V> defaultModel, final List<V> values,
		IChoiceRenderer<V> renderer) {
	DropDownChoice<V> listSelect = new DropDownChoice<V>(id, defaultModel,
			new AbstractReadOnlyModel<List<V>>() {
				private static final long serialVersionUID = 1L;

				@Override
				public List<V> getObject() {
					return values;
				}
			}, renderer);

	listSelect.add(new OnChangeAjaxBehavior() {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(AjaxRequestTarget target) {
			refreshTable(target);
		}
	});

	return listSelect;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:24,代码来源:RoleMemberPanel.java

示例8: initLayout

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private void initLayout(IModel<QName> model, final Class<O> superclass) {
	select = new DropDownChoice<>(ID_SELECT, model,
			new AbstractReadOnlyModel<List<QName>>() {
				private static final long serialVersionUID = 1L;

				@Override
	            public List<QName> getObject() {
					if (superclass == null || superclass == ObjectType.class) {
						return WebComponentUtil.createObjectTypeList();
					}
					if (superclass == FocusType.class) {
						return WebComponentUtil.createFocusTypeList();
					}
					if (superclass == AbstractRoleType.class) {
						return WebComponentUtil.createAbstractRoleTypeList();
					}
					throw new IllegalArgumentException("Unknown superclass "+superclass);
	            }
		}, new QNameChoiceRenderer());
	select.setNullValid(true);
	
	add(select);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:24,代码来源:ObjectTypeSelectPanel.java

示例9: createOptionsForm

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private Form createOptionsForm(String id) {
    final Form options = new AjaxIndicatingForm(id);

    final DropDownChoice<SortParam<FieldValuesOrder>> sortSelect
            = new FieldValueOrderSelector("sort", new PropertyModel<SortParam<FieldValuesOrder>>(valuesProvider, "sort"));
    sortSelect.add(new UpdateOptionsFormBehavior(options));
    options.add(sortSelect);

    final TextField filterField = new TextField<>("filter", new PropertyModel(filterModel, "name"));
    filterField.add(new AjaxFormComponentUpdatingBehavior("keyup") {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            target.add(valuesContainer);
        }
    });
    options.add(filterField);

    addOccurenceOptions(options);

    return options;
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:23,代码来源:AllFacetValuesPanel.java

示例10: createResultPageSizeForm

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private Form createResultPageSizeForm(String id, final IPageableItems resultsView) {
    final Form resultPageSizeForm = new Form(id);

    final DropDownChoice<Long> pageSizeDropDown
            = new DropDownChoice<Long>("resultPageSize",
                    // bind to items per page property of pageable
                    new PropertyModel<Long>(resultsView, "itemsPerPage"),
                    ITEMS_PER_PAGE_OPTIONS);
    pageSizeDropDown.add(new AjaxFormComponentUpdatingBehavior("change") {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            onChange(target);
        }
    });
    resultPageSizeForm.add(pageSizeDropDown);

    return resultPageSizeForm;
}
 
开发者ID:acdh-oeaw,项目名称:vlo-curation,代码行数:20,代码来源:SearchResultsHeaderPanel.java

示例11: onInitialize

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
@Override
protected void onInitialize() {
    super.onInitialize();
    Form                form  = new Form<String>("form");
    Model<ModuleEntity> model = new Model<>(SingularSession.get().getCategoriaSelecionada());
    final DropDownChoice<ModuleEntity> select = new DropDownChoice<>("select", model, categorias,
            new ChoiceRenderer<>("name", "cod"));

    form.add(select);
    select.add(new BSSelectInitBehaviour());
    select.add(new FormComponentAjaxUpdateBehavior("change", (target, component) -> {
        final ModuleEntity categoriaSelecionada = (ModuleEntity) component.getDefaultModelObject();
        SingularSession.get().setCategoriaSelecionada(categoriaSelecionada);
        getPage().getPageParameters().set(MODULE_PARAM_NAME, categoriaSelecionada.getCod());
        final BoxConfigurationData boxConfigurationMetadataDTO = getDefaultMenuSelection(categoriaSelecionada);
        if (boxConfigurationMetadataDTO != null) {
            getPage().getPageParameters().set(MENU_PARAM_NAME, boxConfigurationMetadataDTO.getLabel());
        } else {
            getPage().getPageParameters().remove(MENU_PARAM_NAME);
        }
        setResponsePage(getPage().getClass(), getPage().getPageParameters());
    }));

    add(form);
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:26,代码来源:SelecaoMenuItem.java

示例12: addChartTypeSelect

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private Component addChartTypeSelect() {
	this.chartTypeSelect = new DropDownChoice<ChartTypeEnum>("chartTypeSelect", this.chartType, this.chartTypes);
	this.chartTypeSelect.setOutputMarkupId(true);

	this.chartTypeSelect.add(new AjaxFormComponentUpdatingBehavior("onchange") {

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			ChartConfigurationPanel.this.updateAttributes();
			ChartConfigurationPanel.this.updateSlider();
			target.add(ChartConfigurationPanel.this.attributeSelect);
			target.add(ChartConfigurationPanel.this.sliderContainer);
		}
	});
	return this.chartTypeSelect;
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:17,代码来源:ChartConfigurationPanel.java

示例13: addProcessSelect

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private void addProcessSelect(final Form<Void> layoutForm) {
	this.processNameList = new ArrayList<String>();
	for (final CorrelationProcess process : CorrelationProcess.findAll()) {
		this.processNameList.add(process.getName());
	}

	this.processSelect = new DropDownChoice<String>("processSelect", new Model<String>(), this.processNameList);
	this.processSelect.setOutputMarkupId(true);
	this.processSelect.add(new AjaxFormComponentUpdatingBehavior("onchange") {

		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			BPMNMonitoringPanel.this.process = CorrelationProcess.findByName(BPMNMonitoringPanel.this.processSelect.getChoices().get(Integer.parseInt(BPMNMonitoringPanel.this.processSelect.getValue()))).get(0);
			BPMNMonitoringPanel.this.createProcessInstanceMonitoringProvider();
			target.add(BPMNMonitoringPanel.this.dataTable);
		}

	});

	layoutForm.add(this.processSelect);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:24,代码来源:BPMNMonitoringPanel.java

示例14: addEventTypeDropDown

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private void addEventTypeDropDown() {
	final List<String> eventTypes = EapEventType.getAllTypeNames();
	if (!eventTypes.isEmpty()) {
		eventTypeName = eventTypes.get(0);
	}
	final DropDownChoice<String> eventTypeDropDownChoice = new DropDownChoice<String>("eventTypeDropDownChoice", new Model<String>(), eventTypes);
	eventTypeDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			eventTypeName = eventTypeDropDownChoice.getModelObject();
		}
	});
	if (!eventTypes.isEmpty()) {
		eventTypeDropDownChoice.setModelObject(eventTypes.get(0));
	}
	eventTypeDropDownChoice.setOutputMarkupId(true);
	layoutForm.add(eventTypeDropDownChoice);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:21,代码来源:UploadPanel.java

示例15: addProcessSelect

import org.apache.wicket.markup.html.form.DropDownChoice; //导入依赖的package包/类
private void addProcessSelect(final Form<Void> layoutForm) {
	this.processSelect = new DropDownChoice<String>("processSelect", new Model<String>(), this.processNameList);
	this.processSelect.setOutputMarkupId(true);
	this.processSelect.add(new AjaxFormComponentUpdatingBehavior("onchange") {

		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			final String processValue = SimpleSimulationPanel.this.processSelect.getValue();
			if (processValue != null && !processValue.isEmpty()) {
				final List<CorrelationProcess> processList = CorrelationProcess.findByName(SimpleSimulationPanel.this.processSelect.getChoices().get(Integer.parseInt(SimpleSimulationPanel.this.processSelect.getValue())));
				if (processList.size() > 0) {
					SimpleSimulationPanel.this.selectedProcess = processList.get(0);

					SimpleSimulationPanel.this.createEventTypeList(SimpleSimulationPanel.this.selectedProcess);
					target.add(SimpleSimulationPanel.this.eventTypeSelect);
				}
			}
			SimpleSimulationPanel.this.treeTableProvider.setCorrelationAttributes(SimpleSimulationPanel.this.selectedProcess.getCorrelationAttributes());
		}
	});

	layoutForm.add(this.processSelect);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:26,代码来源:SimpleSimulationPanel.java


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