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


Java DropDownChoice.setNullValid方法代码示例

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


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

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

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

示例3: getTeamListing

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
private DataView<TeamMembership> getTeamListing() {
	return new DataView<TeamMembership>("teams", provider = new TeamProvider(user)) {
		@Override
		protected void populateItem(Item<TeamMembership> item) {
			final TeamMembership team = item.getModelObject();
			Check<TeamMembership> check = newDeleteCheck(item);
			List<Role> roles = new ArrayList<>(Arrays.asList(Role.teamAssignableRoles()));
			item.add(check);
			DropDownChoice<Role> roleSelector = new DropDownChoice<>("td.role",
					new PropertyModel<Role>(team, "role"), roles
			);
			roleSelector.setNullValid(false);
			item.add(roleSelector);
			BookmarkablePageLink<TeamEditPage> editTeamLink = new BookmarkablePageLink<>("link.edit.team", TeamEditPage.class, new PageParameters().add("id", team.getTeam().getId()));
			editTeamLink.add(new Label("td.teamname", new PropertyModel<>(team.getTeam(), "name")));
			item.add(editTeamLink);
			item.setOutputMarkupId(true);
		}
	};
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:21,代码来源:UserEditPage.java

示例4: DropDownChoicePanel

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
public DropDownChoicePanel(String id, IModel<T> model, IModel<? extends List<? extends T>> choices, IChoiceRenderer<T> renderer,
                            boolean allowNull) {
     super(id);

     DropDownChoice<T> input = new DropDownChoice<T>(ID_INPUT, model, choices, renderer) {

     	private static final long serialVersionUID = 1L;

@Override
         protected String getNullValidDisplayValue() {
             return getString("DropDownChoicePanel.notDefined");
         }
     };
     input.setNullValid(allowNull);
     add(input);
 }
 
开发者ID:Evolveum,项目名称:midpoint,代码行数:17,代码来源:DropDownChoicePanel.java

示例5: initRealizatorInput

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
private void initRealizatorInput(WebMarkupContainer realizator) {
    DropDownChoice realizatorCombo = new DropDownChoice<User>(ID_REALIZATOR_COMBO,
            new PropertyModel<User>(filter, WorkFilterDto.F_REALIZATOR),
            GizmoUtils.createUsersModel(this), GizmoUtils.createUserChoiceRenderer()) {

        @Override
        protected String getNullValidKey() {
            return "PageDashboard.everyone";
        }
    };
    realizatorCombo.add(createMultipleVisibilityBehaviour(false));
    realizatorCombo.setNullValid(true);
    realizator.add(realizatorCombo);

    ListMultipleChoice realizatorMulti = new ListMultipleChoice<User>(ID_REALIZATOR_MULTI,
            new PropertyModel<List<User>>(filter, WorkFilterDto.F_REALIZATORS), GizmoUtils.createUsersModel(this),
            GizmoUtils.createUserChoiceRenderer());
    realizatorMulti.add(createMultipleVisibilityBehaviour(true));
    realizator.add(realizatorMulti);
}
 
开发者ID:Evolveum,项目名称:gizmo-v3,代码行数:21,代码来源:PageDashboard.java

示例6: addParameterSettings

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
private void addParameterSettings(final int idx)
{
  final FieldsetPanel fs = gridBuilder.newFieldset(getString("scripting.script.parameterName") + " " + idx);

  final String parameterType = "parameter" + idx + "Type";
  final String parameterName = "parameter" + idx + "Name";
  final MaxLengthTextField name = new MaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(data, parameterName));
  WicketUtils.setSize(name, 20);
  fs.add(name);
  // DropDownChoice type
  final LabelValueChoiceRenderer<ScriptParameterType> typeChoiceRenderer = new LabelValueChoiceRenderer<ScriptParameterType>(this,
      ScriptParameterType.values());
  final DropDownChoice<ScriptParameterType> typeChoice = new DropDownChoice<ScriptParameterType>(fs.getDropDownChoiceId(),
      new PropertyModel<ScriptParameterType>(data, parameterType), typeChoiceRenderer.getValues(), typeChoiceRenderer);
  typeChoice.setNullValid(true);
  typeChoice.setRequired(false);
  fs.add(typeChoice);
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:19,代码来源:ScriptEditForm.java

示例7: onOptionsPanelCreate

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
/**
 * @see org.projectforge.web.wicket.AbstractListForm#onOptionsPanelCreate(org.projectforge.web.wicket.flowlayout.FieldsetPanel, org.projectforge.web.wicket.flowlayout.DivPanel)
 */
@Override
protected void onOptionsPanelCreate(final FieldsetPanel optionsFieldsetPanel, final DivPanel optionsCheckBoxesPanel)
{
  // DropDownChoice listType
  final LabelValueChoiceRenderer<String> typeChoiceRenderer = new LabelValueChoiceRenderer<String>();
  typeChoiceRenderer.addValue("all", getString("filter.all"));
  typeChoiceRenderer.addValue("active", getString("fibu.kost.status.active"));
  typeChoiceRenderer.addValue("nonactive", getString("fibu.kost.status.nonactive"));
  typeChoiceRenderer.addValue("notEnded", getString("notEnded"));
  typeChoiceRenderer.addValue("ended", getString("ended"));
  final DropDownChoice<String> typeChoice = new DropDownChoice<String>(optionsFieldsetPanel.getDropDownChoiceId(), new PropertyModel<String>(this,
      "searchFilter.listType"), typeChoiceRenderer.getValues(), typeChoiceRenderer);
  typeChoice.setNullValid(false);
  optionsFieldsetPanel.add(typeChoice, true);
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:19,代码来源:Kost1ListForm.java

示例8: addDateFormatCombobox

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
private static void addDateFormatCombobox(final GridBuilder gridBuilder, final PFUserDO user, final String labelKey,
    final String property, final String[] dateFormats, final boolean convertExcelFormat)
{
  final FieldsetPanel fs = gridBuilder.newFieldset(gridBuilder.getString(labelKey));
  final LabelValueChoiceRenderer<String> dateFormatChoiceRenderer = new LabelValueChoiceRenderer<String>();
  for (final String str : dateFormats) {
    String dateString = "???";
    final String pattern = convertExcelFormat == true ? str.replace('Y', 'y').replace('D', 'd') : str;
    try {
      final SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
      dateString = dateFormat.format(new Date());
    } catch (final Exception ex) {
      log.warn("Invalid date format in config.xml: " + pattern);
    }
    dateFormatChoiceRenderer.addValue(str, str + ": " + dateString);
  }
  final DropDownChoice<String> dateFormatChoice = new DropDownChoice<String>(fs.getDropDownChoiceId(), new PropertyModel<String>(user,
      property), dateFormatChoiceRenderer.getValues(), dateFormatChoiceRenderer);
  dateFormatChoice.setNullValid(true);
  fs.add(dateFormatChoice);
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:22,代码来源:UserEditForm.java

示例9: initTeamCalPicker

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
/**
 * if has access: create drop down with teamCals else create label
 * 
 * @param fieldSet
 */
private void initTeamCalPicker(final FieldsetPanel fieldSet)
{
  if (access == false) {
    final TeamCalDO calendar = data.getCalendar();
    final Label teamCalTitle = new Label(fieldSet.newChildId(), calendar != null ? new PropertyModel<String>(data.getCalendar(), "title")
        : "");
    fieldSet.add(teamCalTitle);
  } else {
    final List<TeamCalDO> list = teamCalDao.getAllCalendarsWithFullAccess();
    calendarsWithFullAccess = list.toArray(new TeamCalDO[0]);
    final LabelValueChoiceRenderer<TeamCalDO> calChoiceRenderer = new LabelValueChoiceRenderer<TeamCalDO>();
    for (final TeamCalDO cal : list) {
      calChoiceRenderer.addValue(cal, cal.getTitle());
    }
    final DropDownChoice<TeamCalDO> calDropDownChoice = new DropDownChoice<TeamCalDO>(fieldSet.getDropDownChoiceId(),
        new PropertyModel<TeamCalDO>(data, "calendar"), calChoiceRenderer.getValues(), calChoiceRenderer);
    calDropDownChoice.setNullValid(false);
    calDropDownChoice.setRequired(true);
    fieldSet.add(calDropDownChoice);
  }
}
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:27,代码来源:TeamEventEditForm.java

示例10: createDropDown

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
protected DropDownChoice<T> createDropDown(String id, IModel<List<T>> choices, IChoiceRenderer<T> renderer,
                                        boolean required) {
    DropDownChoice choice = new DropDownChoice<T>(id, getModel(), choices, renderer){

        @Override
        protected String getNullValidDisplayValue() {
            return getString("DropDownChoicePanel.empty");
        }
    };
    choice.setNullValid(!required);
    choice.setRequired(required);
    return choice;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:14,代码来源:DropDownFormGroup.java

示例11: initLayout

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
private void initLayout() {
    IModel data = new PropertyModel(getModel(), SearchValue.F_VALUE);

    final DisplayableRenderer renderer = new DisplayableRenderer(choices);
    final DropDownChoice input = new DropDownChoice(ID_COMBO_INPUT, data, choices, renderer) {

        @Override
        public IConverter getConverter(Class type) {
            return renderer;
        }
    };
    input.setNullValid(true);
    input.setOutputMarkupId(true);
    add(input);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:16,代码来源:ComboPopupPanel.java

示例12: DropDownChoicePanel

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
public DropDownChoicePanel(String id, IModel<T> model, IModel<? extends List<? extends T>> choices, boolean allowNull) {
    super(id);

    DropDownChoice input = new DropDownChoice(ID_INPUT, model, choices) {

        @Override
        protected CharSequence getDefaultChoice(String selectedValue) {
            return getString("DropDownChoicePanel.notDefined");
        }
    };
    input.setNullValid(allowNull);
    add(input);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:14,代码来源:DropDownChoicePanel.java

示例13: VirtualRepoAdvancedPanel

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
public VirtualRepoAdvancedPanel(String id, CreateUpdateAction action, VirtualRepoDescriptor repoDescriptor,
        Form<VirtualRepoDescriptor> form) {
    super(id);
    this.action = action;
    this.repoDescriptor = repoDescriptor;
    this.form = form;
    add(new CssClass("virtual-repo-panel-advanced-settings"));

    List<RepoLayout> layouts = centralConfigService.getDescriptor().getRepoLayouts();
    DropDownChoice<RepoLayout> repoLayout = new DropDownChoice<>("repoLayout", layouts,
            new ChoiceRenderer<RepoLayout>("name"));
    repoLayout.setNullValid(true);

    add(repoLayout);
    add(new SchemaHelpBubble("repoLayout.help"));

    // artifactoryRequestsCanRetrieveRemoteArtifacts
    add(new StyledCheckbox("artifactoryRequestsCanRetrieveRemoteArtifacts"));
    add(new SchemaHelpBubble("artifactoryRequestsCanRetrieveRemoteArtifacts.help"));

    // pomRepositoryReferencesCleanupPolicy
    PomCleanupPolicy[] policies = PomCleanupPolicy.values();
    DropDownChoice pomCleanPolicy =
            new DropDownChoice<>("pomRepositoryReferencesCleanupPolicy", Arrays.asList(policies),
                    new ChoiceRenderer<PomCleanupPolicy>("message"));
    add(pomCleanPolicy);
    add(new SchemaHelpBubble("pomRepositoryReferencesCleanupPolicy.help"));

    // keyPair
    WebstartWebAddon webstartAddon = addons.addonByType(WebstartWebAddon.class);
    add(webstartAddon.getKeyPairContainer("keyPairContainer", repoDescriptor.getKey(), isCreate()));
    addCleanCache();
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:34,代码来源:VirtualRepoAdvancedPanel.java

示例14: newProjectDropDownChoice

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
/**
 * 
 * @return
 */
private DropDownChoice<Project> newProjectDropDownChoice() {

	DropDownChoice<Project> projectChoice = new DropDownChoice<>("project", 
			new PropertyModel<Project>(
					adapterSettings, "project"), treeNodeService.getAllProjects());
	projectChoice.setNullValid(true); // enable null
	return projectChoice;
}
 
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:13,代码来源:AdapterAddEditPage.java

示例15: getPageSizeDropDownChoice

import org.apache.wicket.markup.html.form.DropDownChoice; //导入方法依赖的package包/类
public static DropDownChoice<Integer> getPageSizeDropDownChoice(final String id, final Locale locale, final IModel<Integer> model,
  final int minValue, final int maxValue)
  {
final LabelValueChoiceRenderer<Integer> pageSizeChoiceRenderer = new LabelValueChoiceRenderer<Integer>();
final NumberFormat nf = NumberFormat.getInstance(locale);
for (final int size : PAGE_SIZES) {
  if (size >= minValue && size <= maxValue) {
    pageSizeChoiceRenderer.addValue(size, nf.format(size));
  }
}
final DropDownChoice<Integer> pageSizeChoice = new DropDownChoice<Integer>(id, model, pageSizeChoiceRenderer.getValues(),
    pageSizeChoiceRenderer);
pageSizeChoice.setNullValid(false);
return pageSizeChoice;
  }
 
开发者ID:micromata,项目名称:projectforge-webapp,代码行数:16,代码来源:AbstractListForm.java


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