public EditServiceAccessRulePage(ServiceAccessRule rule) { super(new ServiceAccessRule(rule)); // save the original this.orig = rule; // set drop downs to disabled serviceChoice.setEnabled(false); methodChoice.setEnabled(false); }
public EditServiceAccessRulePage(ServiceAccessRule rule) { super(new ServiceAccessRule(rule)); //save the original this.orig = rule; //set drop downs to disabled serviceChoice.setEnabled(false); methodChoice.setEnabled(false); }
public EditServiceAccessRulePage(ServiceAccessRule rule) { super(new ServiceAccessRule(rule)); //save the original this.orig = rule; //set drop downs to disabled serviceChoice.setEnabled(false); methodChoice.setEnabled(false); }
@Override protected void onUpdate(final AjaxRequestTarget target) { if (checkBox.getCheckBox().getConvertedInput()) { modeOneDropDownChoiceYear.setEnabled(true); modeTwoDropDownChoiceYear.setEnabled(true); } else { modeOneDropDownChoiceYear.setEnabled(false); modeTwoDropDownChoiceYear.setEnabled(false); } target.add(modeOneDropDownChoiceYear, modeTwoDropDownChoiceYear); } });
/** * Allows to remove presentation modes from the editor. If only a single presentation mode is * left the editor will setup in non enabled mode and will return that fixed value * * @param mode */ public void disablePresentationMode(DimensionPresentation mode) { presentationModes.remove(mode); if (presentationModes.size() <= 1) { presentation.setModelObject(presentationModes.get(0)); presentation.setEnabled(false); } }
protected void updateUomState() { // if type is value only, no uom if (ValueType.value.equals(statementModel.getObject().getValueType())) { uomSelector.setEnabled(false); statementModel.getObject().getMeassure().setUom(null); } else { uomSelector.setEnabled(true); } }
private DropDownChoice<String> createChoice(String id, int mode) { DropDownChoice<String> choice = new DropDownChoice<>(id, new Model<>(), Arrays.asList(AM, PM)); boolean support = isSupportAmPm(); choice.setOutputMarkupId(true); choice.setNullValid(false); if (mode != -1) choice.setModelObject(mode == Calendar.AM ? choice.getChoices().get(0) : choice.getChoices().get(1)); else choice.setModelObject(choice.getChoices().get(0)); choice.setVisible(support); choice.setEnabled(support); return choice; }
public void enableDependingWidgets(boolean flag, AjaxRequestTarget target) { downsamplestepField.setEnabled(flag); noverviewField.setEnabled(flag); subsamplealgorithmField.setEnabled(flag); extoverviewField.setEnabled(flag); retoverviewField.setEnabled(flag); target.addComponent(downsamplestepField); target.addComponent(noverviewField); target.addComponent(subsamplealgorithmField); target.addComponent(extoverviewField); target.addComponent(retoverviewField); subsamplealgorithmField.modelChanged(); downsamplestepField.modelChanged(); noverviewField.modelChanged(); extoverviewField.modelChanged(); retoverviewField.modelChanged(); } }
@Override protected void onModelSelected(final IModel<Node> model) { type.setEnabled(true); setTypeChoices(model.getObject()); if (type != null) { // if an preexisting image is selected, the constructor is not yet called so the class members are not initialized setPreferredTypeChoice(); final AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class); if (target != null) { target.add(type); } } super.onModelSelected(model); }
public StyleAdminPanel(String id, AbstractStylePage parent) { super(id, parent); initUI(parent.getStyleModel()); if (stylePage instanceof StyleEditPage) { // global styles only editable by full admin if (!stylePage.isAuthenticatedAsAdmin() && parent.getStyleInfo().getWorkspace() == null) { nameTextField.setEnabled(false); uploadLink.setEnabled(false); } if (StylePage.isDefaultStyle(getStylePage().getStyleInfo())) { nameTextField.setEnabled(false); wsChoice.setEnabled(false); } // format only settable upon creation formatChoice.setEnabled(false); formatReadOnlyMessage.setVisible(true); } }
dc.setRequired(true); dc.setOutputMarkupId(true); dc.setEnabled(!getLockInfo().isLocked()); dc.add(new AjaxFormComponentUpdatingBehavior("onChange") { @Override
/** * @see org.projectforge.web.wicket.AbstractEditForm#onBeforeRender() */ @Override public void onBeforeRender() { super.onBeforeRender(); final TaskDO task = isNew() == true ? data.getParentTask() : data; final boolean hasKost2AndTimesheetBookingAccess = ((TaskDao) getBaseDao()) .hasAccessForKost2AndTimesheetBookingStatus( ThreadLocalUserContext.getUser(), task); if (Configuration.getInstance().isCostConfigured() == true && task != null) { // Cost 2 settings final ProjektDO projekt = getTaskTree().getProjekt(task.getId()); if (this.projekt == projekt) { return; } this.projekt = projekt; if (projekt != null) { this.projektKostLabel.setText(projekt.getKost() + ".*"); } else { this.projektKostLabel.setText(""); } kost2listTypeChoice.setEnabled(hasKost2AndTimesheetBookingAccess); kost2BlackWhiteTextField.setEnabled(hasKost2AndTimesheetBookingAccess); } timesheetBookingStatusChoice.setEnabled(hasKost2AndTimesheetBookingAccess); }
DropDownChoice<String> typeChoice = new DropDownChoice<String>("type", typeModel, typeChoices); typeChoice.setEnabled(true); typeGroup.add(typeChoice); add(typeGroup);
private void rebuildAttendees() { attendeesRepeater.removeAll(); for (final TeamEventAttendeeDO attendee : attendees) { final WebMarkupContainer item = new WebMarkupContainer(attendeesRepeater.newChildId()); attendeesRepeater.add(item); item.add(new AttendeeEditableLabel("editableLabel", Model.of(attendee), false)); final DropDownChoice<TeamEventAttendeeStatus> statusChoice = new DropDownChoice<TeamEventAttendeeStatus>("status", new PropertyModel<TeamEventAttendeeStatus>(attendee, "status"), statusChoiceRenderer.getValues(), statusChoiceRenderer); statusChoice.setEnabled(false); item.add(statusChoice); } }
dc.setRequired(true); dc.setOutputMarkupId(true); dc.setEnabled(!getLockInfo().isLocked()); dc.add(new AjaxFormComponentUpdatingBehavior("onChange") { @Override xTypesDropDown.setEnabled(!getLockInfo().isLocked()); form.add(xTypesDropDown); ddo.setNullValid(false); ddo.setOutputMarkupId(true); ddo.setEnabled(!getLockInfo().isLocked()); ddo.add(new AjaxFormComponentUpdatingBehavior("onChange") { @Override
Arrays.asList(LayerType.values()), new LayerTypeRenderer()); layerType.setEnabled(false); container.add(layerType);
featureType.add(LambdaBehavior.onConfigure(_this -> { if (isNull(getModelObject().getId())) { featureType.setEnabled(true); featureType.setChoices(() -> featureSupportRegistry .getUserSelectableTypes(getModelObject().getLayer())); featureType.setEnabled(false); featureType.setChoices(() -> featureSupportRegistry.getAllTypes( getModelObject().getLayer()));
featureType.add(LambdaBehavior.onConfigure(_this -> { if (isNull(getModelObject().getId())) { featureType.setEnabled(true); featureType.setChoices(() -> featureSupportRegistry .getUserSelectableTypes(getModelObject().getLayer())); featureType.setEnabled(false); featureType.setChoices(() -> featureSupportRegistry.getAllTypes( getModelObject().getLayer()));
wsChoice.setEnabled(false);