當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。