private FormComponent<Short> createPositionColumn(final PaymentScheduleDO payment) { final List<Short> availablePositionNumbers = payment.getAuftrag().getPositionenExcludingDeleted().stream() .map(AuftragsPositionDO::getNumber) .collect(Collectors.toList()); return new DropDownChoice<>("positionNumber", new PropertyModel<>(payment, "positionNumber"), availablePositionNumbers) .setNullValid(true) .setRequired(true) .setLabel(new ResourceModel("fibu.auftrag.position")); } }
public ContentImportDialog(IModelReference modelReference) { this.modelReference = modelReference; InitMaps(); this.nodeModel = (JcrNodeModel) modelReference.getModel(); DropDownChoice uuid = new DropDownChoice("uuidBehaviors", new PropertyModel(this, "uuidBehavior"), new ArrayList<String>(uuidOpts.values())); DropDownChoice merge = new DropDownChoice("mergeBehaviors", new PropertyModel(this, "mergeBehavior"), new ArrayList<String>(mergeOpts.values())); DropDownChoice reference = new DropDownChoice("derefBehaviors", new PropertyModel(this, "derefBehavior"), new ArrayList<String>(derefOpts.values())); CheckBox save = new CheckBox("saveBehavior", new PropertyModel(this, "saveBehavior")); add(uuid.setNullValid(false).setRequired(true)); add(merge.setNullValid(false).setRequired(true)); add(reference.setNullValid(false).setRequired(true)); add(save); // file upload setMultiPart(true); setNonAjaxSubmit(); add(fileUploadField = new FileUploadField("fileInput")); setOkLabel("import"); setFocus(uuid); try { String path = this.nodeModel.getNode().getPath(); add(new Label("message", new StringResourceModel("dialog.message", this, null, new Object[] {path}))); //info("Import content from a file to node: " + nodeModel.getNode().getPath()); } catch (RepositoryException e) { log.error("Error getting node from model for contant import",e); throw new RuntimeException("Error getting node from model for contant import: " + e.getMessage()); } }
public ValueSetDeleteDialog(final ResourceBundlePlugin plugin, Bundle bundle) { setSize(DialogConstants.MEDIUM_AUTO); List<ValueSet> valueSets = bundle.getMutableValueSets(); this.plugin = plugin; this.selectedValueSet = valueSets.get(0); add(new Label("label", new StringResourceModel("dialog.valueset.delete.label", plugin, null))); add(new DropDownChoice<>("dropdown", new PropertyModel<>(this, "selectedValueSet"), valueSets, plugin.getValueSetRenderer()) .setNullValid(false) .setRequired(true) ); setFocusOnCancel(); }
Model.of("Immediate save after import")); add(uuid.setNullValid(false).setRequired(true)); add(reference.setNullValid(false).setRequired(true)); add(save);
Model.of("Immediate save after import")); add(uuid.setNullValid(false).setRequired(true)); add(reference.setNullValid(false).setRequired(true)); add(save);
public ValueSetRenameDialog(final ResourceBundlePlugin plugin, Bundle bundle) { setSize(DialogConstants.MEDIUM_AUTO); List<ValueSet> valueSets = bundle.getMutableValueSets(); this.plugin = plugin; selectedValueSet = valueSets.get(0); newName = ""; final TextField<String> newNameField = new TextField<>("name", new PropertyModel<>(this, "newName")); newNameField.setRequired(true); newNameField.add(new ValueSetNameValidator(plugin, selectedValueSet)); newNameField.setOutputMarkupId(true); add(new Label("label", new StringResourceModel("dialog.valueset.rename.label", plugin, null))); add(new DropDownChoice<>("dropdown", new PropertyModel<>(this, "selectedValueSet"), valueSets, plugin.getValueSetRenderer()) .setNullValid(false) .setRequired(true) ); add(newNameField); setFocusOnCancel(); }
fs.getDropDownChoiceId(), new PropertyModel<Class<?>>(this, "entityClass"), clsList, renderer); entdd.setNullValid(false).setRequired(true).setOutputMarkupId(true);
}.setNullValid(false).setRequired(true); } else if(customAttr.equals(CustomAttribute.PROP_INVERSE)) { IModel<OClass> linkedClassModel = (IModel<OClass>)getMetaComponentEnteredValueModel(OPropertyPrototyper.LINKED_CLASS);
yearChoice.setNullValid(false).setRequired(true); fs.add(yearChoice); monthChoice.setNullValid(false).setRequired(true); fs.add(monthChoice); final QuickSelectMonthPanel quickSelectPanel = new QuickSelectMonthPanel(fs.newChildId(), new Model<Date>()
optionsFieldsetPanel.getDropDownChoiceId(), new PropertyModel<Integer>(this, "fromYear"), yearListChoiceRenderer.getYears(), yearListChoiceRenderer); fromYearChoice.setNullValid(false).setRequired(true); optionsFieldsetPanel.add(fromYearChoice); final LabelValueChoiceRenderer<Integer> monthChoiceRenderer = new LabelValueChoiceRenderer<Integer>(); toYearChoice.setNullValid(false).setRequired(true); optionsFieldsetPanel.add(toYearChoice);
valueSetRenderer) .setNullValid(false) .setRequired(true) .add(new AjaxFormComponentUpdatingBehavior("onchange") { private static final long serialVersionUID = 1L;
new PropertyModel(this, "myCurrentPhoneId"), myCurrentPhoneIdChoiceRenderer.getValues(), myCurrentPhoneIdChoiceRenderer); myCurrentPhoneIdChoice.setNullValid(false).setRequired(true); fs.add(myCurrentPhoneIdChoice); fs.addHelpIcon(new ResourceModel("address.myCurrentPhoneId.tooltip.title"),
monthChoice.setNullValid(false).setRequired(true); WicketUtils.setSize(monthChoice, 2); fs.add(monthChoice); final DropDownChoice<EmployeeSalaryType> typeChoice = new DropDownChoice<EmployeeSalaryType>(fs.getDropDownChoiceId(), new PropertyModel<EmployeeSalaryType>(data, "type"), typeStatusChoiceRenderer.getValues(), typeStatusChoiceRenderer); typeChoice.setNullValid(false).setRequired(true); fs.add(typeChoice);
final DropDownChoice<HRPlanningEntryStatus> statusChoice = new DropDownChoice<HRPlanningEntryStatus>(fs.getDropDownChoiceId(), new PropertyModel<HRPlanningEntryStatus>(entry, "status"), statusChoiceRenderer.getValues(), statusChoiceRenderer); statusChoice.setNullValid(true).setRequired(false).setEnabled(!entry.isDeleted()); fs.add(statusChoice); dependentEntryFormComponents.add(statusChoice);
final DropDownChoice<BookType> bookTypeChoice = new DropDownChoice<BookType>(fs.getDropDownChoiceId(), new PropertyModel<BookType>(data, "type"), bookTypeChoiceRenderer.getValues(), bookTypeChoiceRenderer); bookTypeChoice.setNullValid(false).setRequired(true); fs.add(bookTypeChoice); new PropertyModel<BookStatus>(data, "status"), bookStatusChoiceRenderer.getValues(), bookStatusChoiceRenderer); bookStatusChoice.setNullValid(false).setRequired(true); fs.add(bookStatusChoice);
final DropDownChoice<VacationStatus> statusChoice = new DropDownChoice<>(fs.getDropDownChoiceId(), new PropertyModel<>(data, "status"), statusChoiceRenderer.getValues(), statusChoiceRenderer); statusChoice.setNullValid(false).setRequired(true); statusChoice.setMarkupId("vacation-status").setOutputMarkupId(true); statusChoice.setEnabled(hasUserEditStatusRight());
genderChoiceRenderer.getValues(), genderChoiceRenderer); statusChoice.setNullValid(false).setRequired(true); statusChoice.setMarkupId("gender").setOutputMarkupId(true); fs.add(statusChoice);
visitortypeChoiceRenderer.getValues(), visitortypeChoiceRenderer); statusChoice.setNullValid(false).setRequired(true); statusChoice.setMarkupId("visitortype").setOutputMarkupId(true); fs.add(statusChoice);
final DropDownChoice<KundeStatus> statusChoice = new DropDownChoice<KundeStatus>(fs.getDropDownChoiceId(), new PropertyModel<KundeStatus>(data, "status"), statusChoiceRenderer.getValues(), statusChoiceRenderer); statusChoice.setNullValid(false).setRequired(true); fs.add(statusChoice);
final DropDownChoice<ProjektStatus> statusChoice = new DropDownChoice<ProjektStatus>(fs.getDropDownChoiceId(), new PropertyModel<ProjektStatus>(data, "status"), statusChoiceRenderer.getValues(), statusChoiceRenderer); statusChoice.setNullValid(false).setRequired(true); fs.add(statusChoice);