This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch 3_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/3_0_X by this push:
new ab01f1ac29 [SYNCOPE-1832] AjaxSpinnerFieldPanel -> AjaxNumberFieldPanel
ab01f1ac29 is described below
commit ab01f1ac295c40538b688e0c56448e0f3437c7b8
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Sun Oct 20 18:56:52 2024 +0200
[SYNCOPE-1832] AjaxSpinnerFieldPanel -> AjaxNumberFieldPanel
---
.../clientapps/ClientAppModalPanelBuilder.java | 6 +-
.../console/panels/SRARouteWizardBuilder.java | 4 +-
.../policies/AttrReleasePolicyModalPanel.java | 4 +-
.../console/wizards/AttrRepoWizardBuilder.java | 4 +-
.../console/wizards/AuthModuleWizardBuilder.java | 4 +-
.../markup/html/list/ConnConfPropertyListView.java | 7 +-
.../wizards/resources/ConnectorDetailsPanel.java | 14 +-
.../wizards/resources/ResourceDetailsPanel.java | 4 +-
.../markup/html/form/AjaxNumberFieldPanel.java | 220 +++++++++++++--
.../markup/html/form/AjaxSpinnerFieldPanel.java | 305 ---------------------
.../client/ui/commons/panels/SyncopeFormPanel.java | 4 +-
.../markup/html/form/AjaxSpinnerFieldPanel.html | 28 --
.../syncope/client/console/panels/BeanPanel.java | 6 +-
.../console/panels/DomainPoolModalPanel.java | 6 +-
.../client/console/panels/DomainWizardBuilder.java | 6 +-
.../console/panels/ParametersWizardAttrStep.java | 6 +-
.../console/panels/search/SearchClausePanel.java | 6 +-
.../console/policies/PolicyModalPanelBuilder.java | 22 +-
.../console/tasks/SchedTaskWizardBuilder.java | 8 +-
.../wizards/any/AbstractAttrsWizardStep.java | 6 +-
.../client/enduser/panels/any/PlainAttrs.java | 6 +-
.../console/panels/SCIMConfGeneralPanel.java | 12 +-
.../syncope/fit/console/ParametersITCase.java | 6 +-
.../apache/syncope/fit/console/PoliciesITCase.java | 16 +-
.../apache/syncope/fit/console/UsersITCase.java | 2 +-
25 files changed, 282 insertions(+), 430 deletions(-)
diff --git
a/client/am/console/src/main/java/org/apache/syncope/client/console/clientapps/ClientAppModalPanelBuilder.java
b/client/am/console/src/main/java/org/apache/syncope/client/console/clientapps/ClientAppModalPanelBuilder.java
index bd6c27c25c..eacc63f097 100644
---
a/client/am/console/src/main/java/org/apache/syncope/client/console/clientapps/ClientAppModalPanelBuilder.java
+++
b/client/am/console/src/main/java/org/apache/syncope/client/console/clientapps/ClientAppModalPanelBuilder.java
@@ -47,8 +47,8 @@ import org.apache.syncope.client.ui.commons.Constants;
import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.pages.BaseWebPage;
import org.apache.syncope.client.ui.commons.panels.WizardModalPanel;
@@ -205,7 +205,7 @@ public class ClientAppModalPanelBuilder<T extends
ClientAppTO> extends AbstractM
max(Comparator.comparing(ClientAppTO::getClientAppId)).
ifPresent(app ->
clientAppTO.setClientAppId(app.getClientAppId() + 1));
}
- fields.add(new AjaxSpinnerFieldPanel.Builder<Long>().build(
+ fields.add(new AjaxNumberFieldPanel.Builder<Long>().build(
"field", "clientAppId", Long.class,
new PropertyModel<>(clientAppTO,
"clientAppId")).setRequired(true));
@@ -434,7 +434,7 @@ public class ClientAppModalPanelBuilder<T extends
ClientAppTO> extends AbstractM
requiredNameIdFormat.addRequiredLabel().setEnabled(true);
fields.add(requiredNameIdFormat);
- fields.add(new
AjaxSpinnerFieldPanel.Builder<Integer>().min(0).build(
+ fields.add(new
AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
"field", "skewAllowance", Integer.class,
new PropertyModel<>(clientAppTO,
"skewAllowance")));
diff --git
a/client/am/console/src/main/java/org/apache/syncope/client/console/panels/SRARouteWizardBuilder.java
b/client/am/console/src/main/java/org/apache/syncope/client/console/panels/SRARouteWizardBuilder.java
index ea3cc0782c..1505753740 100644
---
a/client/am/console/src/main/java/org/apache/syncope/client/console/panels/SRARouteWizardBuilder.java
+++
b/client/am/console/src/main/java/org/apache/syncope/client/console/panels/SRARouteWizardBuilder.java
@@ -27,7 +27,7 @@ import
org.apache.syncope.client.console.wizards.BaseAjaxWizardBuilder;
import org.apache.syncope.client.ui.commons.Constants;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.common.lib.to.SRARouteTO;
import org.apache.syncope.common.lib.types.SRARouteType;
@@ -154,7 +154,7 @@ public class SRARouteWizardBuilder extends
BaseAjaxWizardBuilder<SRARouteTO> {
add(new AjaxCheckBoxPanel("csrf", "csrf", new
PropertyModel<>(route, "csrf")));
- add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).build(
+ add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
"order", "order", Integer.class, new
PropertyModel<>(route, "order")).
setRequired(true));
}
diff --git
a/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AttrReleasePolicyModalPanel.java
b/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AttrReleasePolicyModalPanel.java
index 636bd48c8b..2995d794ca 100644
---
a/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AttrReleasePolicyModalPanel.java
+++
b/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AttrReleasePolicyModalPanel.java
@@ -31,8 +31,8 @@ import org.apache.syncope.client.ui.commons.Constants;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxGridFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.pages.BaseWebPage;
import org.apache.syncope.common.lib.policy.AttrReleasePolicyTO;
@@ -120,7 +120,7 @@ public class AttrReleasePolicyModalPanel extends
AbstractModalPanel<AttrReleaseP
new PropertyModel<>(model.getObject().getConf(),
"principalAttrRepoConf.ignoreResolvedAttributes"),
false));
- add(new AjaxSpinnerFieldPanel.Builder<Long>().build(
+ add(new AjaxNumberFieldPanel.Builder<Long>().build(
"expiration",
"expiration",
Long.class,
diff --git
a/client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AttrRepoWizardBuilder.java
b/client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AttrRepoWizardBuilder.java
index 69598be3e0..5253630e52 100644
---
a/client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AttrRepoWizardBuilder.java
+++
b/client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AttrRepoWizardBuilder.java
@@ -28,7 +28,7 @@ import
org.apache.syncope.client.console.rest.AttrRepoRestClient;
import org.apache.syncope.client.console.wizards.mapping.AttrRepoMappingPanel;
import org.apache.syncope.client.ui.commons.Constants;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.wizards.AjaxWizard;
import org.apache.syncope.common.lib.attr.AttrRepoConf;
@@ -125,7 +125,7 @@ public class AttrRepoWizardBuilder extends
BaseAjaxWizardBuilder<AttrRepoTO> {
state.setNullValid(false);
add(state);
- add(new AjaxSpinnerFieldPanel.Builder<Integer>().build(
+ add(new AjaxNumberFieldPanel.Builder<Integer>().build(
"order",
"order",
Integer.class,
diff --git
a/client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AuthModuleWizardBuilder.java
b/client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AuthModuleWizardBuilder.java
index f42f6d0b7c..a0b7317bf4 100644
---
a/client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AuthModuleWizardBuilder.java
+++
b/client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AuthModuleWizardBuilder.java
@@ -30,7 +30,7 @@ import org.apache.syncope.client.ui.commons.Constants;
import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.wizards.AjaxWizard;
import org.apache.syncope.common.lib.AbstractLDAPConf;
@@ -129,7 +129,7 @@ public class AuthModuleWizardBuilder extends
BaseAjaxWizardBuilder<AuthModuleTO>
state.setNullValid(false);
add(state);
- add(new AjaxSpinnerFieldPanel.Builder<Integer>().build(
+ add(new AjaxNumberFieldPanel.Builder<Integer>().build(
"order",
"order",
Integer.class,
diff --git
a/client/idm/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
b/client/idm/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
index 923c79c55f..f45b5d8472 100644
---
a/client/idm/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
+++
b/client/idm/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java
@@ -30,8 +30,8 @@ import org.apache.syncope.client.ui.commons.Constants;
import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import
org.apache.syncope.client.ui.commons.markup.html.form.AbstractFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxPasswordFieldPanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
import org.apache.syncope.common.lib.types.ConnConfProperty;
@@ -100,9 +100,8 @@ public class ConnConfPropertyListView extends
ListView<ConnConfProperty> {
}
if (ClassUtils.isAssignable(Number.class, propertySchemaClass)) {
- @SuppressWarnings("unchecked")
- Class<Number> numberClass = (Class<Number>)
propertySchemaClass;
- field = new AjaxSpinnerFieldPanel.Builder<>().build("panel",
label, numberClass, new Model<>());
+ field = new AjaxNumberFieldPanel.Builder<>().build(
+ "panel", label,
AjaxNumberFieldPanel.cast(propertySchemaClass), new Model<>());
required = property.getSchema().isRequired();
} else if (ClassUtils.isAssignable(Boolean.class,
propertySchemaClass)) {
field = new AjaxCheckBoxPanel("panel", label, new Model<>());
diff --git
a/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
b/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
index 8feec773a7..42f107c507 100644
---
a/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
+++
b/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java
@@ -30,7 +30,7 @@ import
org.apache.syncope.client.console.wicket.markup.html.form.AjaxSearchField
import org.apache.syncope.client.ui.commons.Constants;
import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.common.lib.to.ConnIdBundle;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -180,27 +180,27 @@ public class ConnectorDetailsPanel extends WizardStep {
connInstanceTO.setPoolConf(new ConnPoolConfTO());
}
- add(new
AjaxSpinnerFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
+ add(new
AjaxNumberFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
"connRequestTimeout", "connRequestTimeout", Integer.class,
new PropertyModel<>(connInstanceTO, "connRequestTimeout")));
- add(new
AjaxSpinnerFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
+ add(new
AjaxNumberFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
"poolMaxObjects", "poolMaxObjects", Integer.class,
new PropertyModel<>(connInstanceTO.getPoolConf(),
"maxObjects")));
- add(new
AjaxSpinnerFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
+ add(new
AjaxNumberFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
"poolMinIdle", "poolMinIdle", Integer.class,
new PropertyModel<>(connInstanceTO.getPoolConf(), "minIdle")));
- add(new
AjaxSpinnerFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
+ add(new
AjaxNumberFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
"poolMaxIdle", "poolMaxIdle", Integer.class,
new PropertyModel<>(connInstanceTO.getPoolConf(), "maxIdle")));
- add(new
AjaxSpinnerFieldPanel.Builder<Long>().min(0L).max(Long.MAX_VALUE).build(
+ add(new
AjaxNumberFieldPanel.Builder<Long>().min(0L).max(Long.MAX_VALUE).build(
"poolMaxWait", "poolMaxWait", Long.class,
new PropertyModel<>(connInstanceTO.getPoolConf(), "maxWait")));
- add(new
AjaxSpinnerFieldPanel.Builder<Long>().min(0L).max(Long.MAX_VALUE).build(
+ add(new
AjaxNumberFieldPanel.Builder<Long>().min(0L).max(Long.MAX_VALUE).build(
"poolMinEvictableIdleTime", "poolMinEvictableIdleTime",
Long.class,
new PropertyModel<>(connInstanceTO.getPoolConf(),
"minEvictableIdleTimeMillis")));
}
diff --git
a/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceDetailsPanel.java
b/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceDetailsPanel.java
index 69fb3dac41..3aced1c64e 100644
---
a/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceDetailsPanel.java
+++
b/client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceDetailsPanel.java
@@ -28,8 +28,8 @@ import
org.apache.syncope.client.console.rest.ImplementationRestClient;
import org.apache.syncope.client.ui.commons.Constants;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
import org.apache.syncope.common.lib.to.ImplementationTO;
@@ -102,7 +102,7 @@ public class ResourceDetailsPanel extends WizardStep {
new PropertyModel<>(resourceTO, "enforceMandatoryCondition"),
false));
- container.add(new AjaxSpinnerFieldPanel.Builder<Integer>().build(
+ container.add(new AjaxNumberFieldPanel.Builder<Integer>().build(
"propagationPriority",
"propagationPriority",
Integer.class,
diff --git
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java
index ff20240e40..39c6824b59 100644
---
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java
+++
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxNumberFieldPanel.java
@@ -20,36 +20,61 @@ package
org.apache.syncope.client.ui.commons.markup.html.form;
import com.googlecode.wicket.jquery.core.Options;
import com.googlecode.wicket.kendo.ui.form.NumberTextField;
+import com.googlecode.wicket.kendo.ui.resource.KendoCultureResourceReference;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Optional;
+import java.util.function.Predicate;
+import org.apache.commons.lang3.math.NumberUtils;
import org.apache.syncope.client.ui.commons.Constants;
import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
+import org.apache.syncope.common.lib.Attr;
+import org.apache.syncope.common.lib.Attributable;
import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
+import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
import org.apache.wicket.model.ResourceModel;
public final class AjaxNumberFieldPanel<T extends Number & Comparable<T>>
extends FieldPanel<T> {
private static final long serialVersionUID = 6413819574530703577L;
+ @SuppressWarnings("unchecked")
+ public static <T extends Number & Comparable<T>> Class<T> cast(final
Class<?> clazz) {
+ return (Class<T>) clazz;
+ }
+
+ private final Class<T> reference;
+
private final IModel<T> model;
private final Options options;
private final boolean enableOnChange;
+ private final boolean convertValuesToString;
+
private AjaxNumberFieldPanel(
final String id,
final String name,
+ final Class<T> reference,
final IModel<T> model,
final Options options,
- final boolean enableOnChange) {
+ final boolean enableOnChange,
+ final boolean convertValuesToString) {
super(id, name, model);
+ this.reference = reference;
this.model = model;
this.options = options;
this.enableOnChange = enableOnChange;
+ this.convertValuesToString = convertValuesToString;
- field = new NumberTextField<>("numberTextField", model, options);
+ field = new NumberTextField<>("numberTextField", model, reference,
options);
if (enableOnChange && !isReadOnly()) {
field.add(new
IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
@@ -69,14 +94,152 @@ public final class AjaxNumberFieldPanel<T extends Number &
Comparable<T>> extend
@Override
public FieldPanel<T> setReadOnly(final boolean readOnly) {
super.setReadOnly(readOnly);
- AjaxNumberFieldPanel.class.cast(field).setEnabled(!readOnly);
+ NumberTextField.class.cast(field).setEnabled(!readOnly);
+ return this;
+ }
+
+ @Override
+ public AjaxNumberFieldPanel<T> setNewModel(final List<Serializable> list) {
+ setNewModel(new Model<>() {
+
+ private static final long serialVersionUID = 527651414610325237L;
+
+ @Override
+ public T getObject() {
+ T value = null;
+
+ if (list != null && !list.isEmpty() && list.get(0) != null &&
!list.get(0).toString().isEmpty()) {
+ value = reference.equals(Integer.class)
+ ?
reference.cast(NumberUtils.toInt(list.get(0).toString()))
+ : reference.equals(Long.class)
+ ?
reference.cast(NumberUtils.toLong(list.get(0).toString()))
+ : reference.equals(Short.class)
+ ?
reference.cast(NumberUtils.toShort(list.get(0).toString()))
+ : reference.equals(Float.class)
+ ?
reference.cast(NumberUtils.toFloat(list.get(0).toString()))
+ : reference.equals(byte.class)
+ ?
reference.cast(NumberUtils.toByte(list.get(0).toString()))
+ :
reference.cast(NumberUtils.toDouble(list.get(0).toString()));
+ }
+
+ return value;
+ }
+
+ @Override
+ public void setObject(final T object) {
+ list.clear();
+ Optional.ofNullable(object).ifPresent(v ->
list.add(convertValuesToString ? v.toString() : v));
+ }
+ });
+
+ return this;
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public AjaxNumberFieldPanel<T> setNewModel(final ListItem item) {
+ field.setModel(new Model<>() {
+
+ private static final long serialVersionUID = 6799404673615637845L;
+
+ @Override
+ public T getObject() {
+ T number = null;
+
+ final Object obj = item.getModelObject();
+
+ if (obj != null && !obj.toString().isEmpty()) {
+ if (obj instanceof String) {
+ try {
+ number = reference.equals(Integer.class)
+ ? reference.cast(Integer.valueOf((String)
obj))
+ : reference.equals(Long.class)
+ ? reference.cast(Long.valueOf((String)
obj))
+ : reference.equals(Short.class)
+ ? reference.cast(Short.valueOf((String)
obj))
+ : reference.equals(Float.class)
+ ? reference.cast(Float.valueOf((String)
obj))
+ : reference.equals(byte.class)
+ ? reference.cast(Byte.valueOf((String)
obj))
+ : reference.cast(Double.valueOf((String)
obj));
+ } catch (NumberFormatException e) {
+ LOG.error("While attempting to parse {}", obj, e);
+ }
+ } else if (obj instanceof Number) {
+ number = reference.equals(Integer.class)
+ ? reference.cast(((Number) obj).intValue())
+ : reference.equals(Long.class)
+ ? reference.cast(((Number) obj).longValue())
+ : reference.equals(Short.class)
+ ? reference.cast(((Number) obj).shortValue())
+ : reference.equals(Float.class)
+ ? reference.cast(((Number) obj).floatValue())
+ : reference.equals(byte.class)
+ ? reference.cast(((Number) obj).byteValue())
+ : reference.cast(((Number) obj).doubleValue());
+ }
+ }
+
+ return number;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public void setObject(final T object) {
+ item.setModelObject(Optional.ofNullable(object).
+ map(v -> convertValuesToString ? v.toString() : v).
+ orElse(null));
+ }
+ });
+
return this;
}
+ @Override
+ public FieldPanel<T> setNewModel(final Attributable attributable, final
String schema) {
+ field.setModel(new Model<>() {
+
+ private static final long serialVersionUID = -4214654722524358000L;
+
+ @Override
+ public T getObject() {
+ return
attributable.getPlainAttr(schema).map(Attr::getValues).filter(Predicate.not(List::isEmpty)).
+ map(values -> reference.equals(Integer.class)
+ ? reference.cast(NumberUtils.toInt(values.get(0)))
+ : reference.equals(Long.class)
+ ? reference.cast(NumberUtils.toLong(values.get(0)))
+ : reference.equals(Short.class)
+ ? reference.cast(NumberUtils.toShort(values.get(0)))
+ : reference.equals(Float.class)
+ ? reference.cast(NumberUtils.toFloat(values.get(0)))
+ : reference.equals(byte.class)
+ ? reference.cast(NumberUtils.toByte(values.get(0)))
+ : reference.cast(NumberUtils.toDouble(values.get(0)))).
+ orElse(null);
+ }
+
+ @Override
+ public void setObject(final T object) {
+ attributable.getPlainAttr(schema).ifPresent(plainAttr -> {
+ plainAttr.getValues().clear();
+ Optional.ofNullable(object).ifPresent(o ->
plainAttr.getValues().add(o.toString()));
+ });
+ }
+ });
+
+ return this;
+ }
+
+ @Override
+ public void renderHead(final IHeaderResponse response) {
+ super.renderHead(response);
+ response.render(JavaScriptHeaderItem.forReference(new
KendoCultureResourceReference(getLocale())));
+ }
+
@Override
public AjaxNumberFieldPanel<T> clone() {
AjaxNumberFieldPanel<T> panel = new AjaxNumberFieldPanel<>(
- getId(), name, model, options, enableOnChange);
+ getId(), name, reference, model, options, enableOnChange,
convertValuesToString);
panel.setRequired(isRequired());
panel.setReadOnly(isReadOnly());
@@ -91,19 +254,11 @@ public final class AjaxNumberFieldPanel<T extends Number &
Comparable<T>> extend
public static class Builder<T extends Number & Comparable<T>> {
- private final Options options;
+ private final Options options = new Options();
private boolean enableOnChange = false;
- public Builder() {
- this(new Options().set("format", "'#'").set("step", "1"));
- }
-
- public Builder(final Options options) {
- this.options = options;
- options.set("format", "'#'");
- options.set("step", "1");
- }
+ private boolean convertValuesToString = true;
public Builder<T> min(final T min) {
options.set("min", min);
@@ -115,13 +270,18 @@ public final class AjaxNumberFieldPanel<T extends Number
& Comparable<T>> extend
return this;
}
+ public Builder<T> format(final String format) {
+ options.set("format", format);
+ return this;
+ }
+
public Builder<T> step(final T step) {
options.set("step", step);
return this;
}
- public Builder<T> format(final String format) {
- options.set("format", format);
+ public Builder<T> options(final Options options) {
+ options.entries().forEach(e -> this.options.set(e.getKey(),
e.getValue()));
return this;
}
@@ -130,12 +290,38 @@ public final class AjaxNumberFieldPanel<T extends Number
& Comparable<T>> extend
return this;
}
+ public Builder<T> convertValuesToString(final boolean
convertValuesToString) {
+ this.convertValuesToString = convertValuesToString;
+ return this;
+ }
+
public AjaxNumberFieldPanel<T> build(
final String id,
final String name,
+ final Class<T> reference,
final IModel<T> model) {
- return new AjaxNumberFieldPanel<>(id, name, model, options,
enableOnChange);
+ if (options.entries().stream().noneMatch(e ->
"decimals".equals(e.getKey()))) {
+ options.set("decimals", "10");
+ }
+
+ if (options.entries().stream().noneMatch(o ->
"format".equalsIgnoreCase(o.getKey()))) {
+ if (reference.equals(Integer.class) ||
reference.equals(Long.class) || reference.equals(Short.class)) {
+ options.set("format", "'#'");
+ } else {
+ options.set("format", "'#.##########'");
+ }
+ }
+ if (options.entries().stream().noneMatch(o ->
"step".equalsIgnoreCase(o.getKey()))) {
+ if (reference.equals(Integer.class) ||
reference.equals(Long.class) || reference.equals(Short.class)) {
+ options.set("step", "1");
+ } else {
+ options.set("step", "0.000000001");
+ }
+ }
+
+ return new AjaxNumberFieldPanel<>(
+ id, name, reference, model, options, enableOnChange,
convertValuesToString);
}
}
}
diff --git
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.java
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.java
deleted file mode 100644
index 988827a61b..0000000000
---
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.ui.commons.markup.html.form;
-
-import com.googlecode.wicket.jquery.core.Options;
-import com.googlecode.wicket.jquery.ui.JQueryUIBehavior;
-import com.googlecode.wicket.jquery.ui.form.spinner.AjaxSpinner;
-import com.googlecode.wicket.jquery.ui.form.spinner.SpinnerAdapter;
-import com.googlecode.wicket.jquery.ui.form.spinner.SpinnerBehavior;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Optional;
-import java.util.function.Predicate;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.syncope.client.ui.commons.Constants;
-import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
-import org.apache.syncope.common.lib.Attr;
-import org.apache.syncope.common.lib.Attributable;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.ResourceModel;
-
-public final class AjaxSpinnerFieldPanel<T extends Number> extends
FieldPanel<T> {
-
- private static final long serialVersionUID = 6413819574530703577L;
-
- private final Class<T> reference;
-
- private final IModel<T> model;
-
- private final Options options;
-
- private final boolean convertValuesToString;
-
- private SpinnerBehavior behavior;
-
- private AjaxSpinnerFieldPanel(
- final String id,
- final String name,
- final Class<T> reference,
- final IModel<T> model,
- final Options options,
- final boolean enableOnChange,
- final boolean convertValuesToString) {
-
- super(id, name, model);
-
- field = new AjaxSpinner<>("spinner", model, options, reference) {
-
- private static final long serialVersionUID = -3624755213720060594L;
-
- @Override
- public JQueryUIBehavior newWidgetBehavior(final String selector) {
- behavior = new SpinnerBehavior(selector, new SpinnerAdapter());
- behavior.setOptions(options);
- return behavior;
- }
- };
-
- if (enableOnChange && !isReadOnly()) {
- field.add(new
IndicatorAjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
-
- private static final long serialVersionUID =
-1107858522700306810L;
-
- @Override
- protected void onUpdate(final AjaxRequestTarget target) {
- // nothing to do
- }
- });
- }
-
- add(field.setLabel(new ResourceModel(name,
name)).setOutputMarkupId(true));
-
- this.name = name;
- this.model = model;
- this.reference = reference;
- this.options = options;
- this.convertValuesToString = convertValuesToString;
- }
-
- @Override
- public AjaxSpinnerFieldPanel<T> setNewModel(final List<Serializable> list)
{
- setNewModel(new Model<>() {
-
- private static final long serialVersionUID = 527651414610325237L;
-
- @Override
- public T getObject() {
- T value = null;
-
- if (list != null && !list.isEmpty()
- && list.get(0) != null &&
StringUtils.isNotBlank(list.get(0).toString())) {
-
- value = reference.equals(Integer.class)
- ?
reference.cast(NumberUtils.toInt(list.get(0).toString()))
- : reference.equals(Long.class)
- ?
reference.cast(NumberUtils.toLong(list.get(0).toString()))
- : reference.equals(Short.class)
- ?
reference.cast(NumberUtils.toShort(list.get(0).toString()))
- : reference.equals(Float.class)
- ?
reference.cast(NumberUtils.toFloat(list.get(0).toString()))
- : reference.equals(byte.class)
- ?
reference.cast(NumberUtils.toByte(list.get(0).toString()))
- :
reference.cast(NumberUtils.toDouble(list.get(0).toString()));
- }
-
- return value;
- }
-
- @Override
- public void setObject(final T object) {
- list.clear();
- Optional.ofNullable(object).ifPresent(v ->
list.add(convertValuesToString ? v.toString() : v));
- }
- });
-
- return this;
- }
-
- @SuppressWarnings("rawtypes")
- @Override
- public AjaxSpinnerFieldPanel<T> setNewModel(final ListItem item) {
- field.setModel(new Model<>() {
-
- private static final long serialVersionUID = 6799404673615637845L;
-
- @Override
- public T getObject() {
- T number = null;
-
- final Object obj = item.getModelObject();
-
- if (obj != null && !obj.toString().isEmpty()) {
- if (obj instanceof String) {
- try {
- number = reference.equals(Integer.class)
- ? reference.cast(Integer.valueOf((String)
obj))
- : reference.equals(Long.class)
- ? reference.cast(Long.valueOf((String)
obj))
- : reference.equals(Short.class)
- ? reference.cast(Short.valueOf((String)
obj))
- : reference.equals(Float.class)
- ? reference.cast(Float.valueOf((String)
obj))
- : reference.equals(byte.class)
- ? reference.cast(Byte.valueOf((String)
obj))
- : reference.cast(Double.valueOf((String)
obj));
- } catch (NumberFormatException e) {
- LOG.error("While attempting to parse {}", obj, e);
- }
- } else if (obj instanceof Number) {
- number = reference.equals(Integer.class)
- ? reference.cast(((Number) obj).intValue())
- : reference.equals(Long.class)
- ? reference.cast(((Number) obj).longValue())
- : reference.equals(Short.class)
- ? reference.cast(((Number) obj).shortValue())
- : reference.equals(Float.class)
- ? reference.cast(((Number) obj).floatValue())
- : reference.equals(byte.class)
- ? reference.cast(((Number) obj).byteValue())
- : reference.cast(((Number) obj).doubleValue());
- }
- }
-
- return number;
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public void setObject(final T object) {
- item.setModelObject(Optional.ofNullable(object).
- map(v -> convertValuesToString ? v.toString() : v).
- orElse(null));
- }
- });
-
- return this;
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public FieldPanel<T> setNewModel(final Attributable attributable, final
String schema) {
- field.setModel(new Model() {
-
- private static final long serialVersionUID = -4214654722524358000L;
-
- @Override
- public Serializable getObject() {
- return
attributable.getPlainAttr(schema).map(Attr::getValues).filter(Predicate.not(List::isEmpty)).
- map(values -> reference.equals(Integer.class)
- ? reference.cast(NumberUtils.toInt(values.get(0)))
- : reference.equals(Long.class)
- ? reference.cast(NumberUtils.toLong(values.get(0)))
- : reference.equals(Short.class)
- ? reference.cast(NumberUtils.toShort(values.get(0)))
- : reference.equals(Float.class)
- ? reference.cast(NumberUtils.toFloat(values.get(0)))
- : reference.equals(byte.class)
- ? reference.cast(NumberUtils.toByte(values.get(0)))
- : reference.cast(NumberUtils.toDouble(values.get(0)))).
- orElse(null);
- }
-
- @Override
- public void setObject(final Serializable object) {
- attributable.getPlainAttr(schema).ifPresent(plainAttr -> {
- plainAttr.getValues().clear();
- Optional.ofNullable(object).ifPresent(o ->
plainAttr.getValues().add(o.toString()));
- });
- }
- });
-
- return this;
- }
-
- @Override
- public AjaxSpinnerFieldPanel<T> clone() {
- AjaxSpinnerFieldPanel<T> panel = new AjaxSpinnerFieldPanel<>(
- getId(), name, reference, model, options, false,
convertValuesToString);
-
- panel.setRequired(isRequired());
- panel.setReadOnly(isReadOnly());
- panel.setTitle(title);
-
- if (isRequiredLabelAdded) {
- panel.addRequiredLabel();
- }
-
- return panel;
- }
-
- @Override
- public FieldPanel<T> setReadOnly(final boolean readOnly) {
- super.setReadOnly(readOnly);
- AjaxSpinner.class.cast(field).setEnabled(!readOnly);
- options.set("disabled", readOnly);
- if (behavior != null) {
- behavior.setOptions(options);
- }
- return this;
- }
-
- public static class Builder<T extends Number> {
-
- private final Options options = new Options();
-
- private boolean enableOnChange = false;
-
- private boolean convertValuesToString = true;
-
- public Builder<T> min(final T min) {
- options.set("min", min);
- return this;
- }
-
- public Builder<T> max(final T max) {
- options.set("max", max);
- return this;
- }
-
- public Builder<T> step(final T step) {
- options.set("step", step);
- return this;
- }
-
- public Builder<T> enableOnChange() {
- enableOnChange = true;
- return this;
- }
-
- public Builder<T> convertValuesToString(final boolean
convertValuesToString) {
- this.convertValuesToString = convertValuesToString;
- return this;
- }
-
- public AjaxSpinnerFieldPanel<T> build(
- final String id,
- final String name,
- final Class<T> reference,
- final IModel<T> model) {
-
- return new AjaxSpinnerFieldPanel<>(
- id, name, reference, model, options, enableOnChange,
convertValuesToString);
- }
- }
-}
diff --git
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/panels/SyncopeFormPanel.java
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/panels/SyncopeFormPanel.java
index b78cfc36aa..022fd8863a 100644
---
a/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/panels/SyncopeFormPanel.java
+++
b/client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/panels/SyncopeFormPanel.java
@@ -33,9 +33,9 @@ import
org.apache.syncope.client.ui.commons.markup.html.form.AbstractFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateTimeFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxPasswordFieldPanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.common.lib.form.FormProperty;
import org.apache.syncope.common.lib.form.FormPropertyValue;
@@ -171,7 +171,7 @@ public class SyncopeFormPanel<F extends SyncopeForm>
extends Panel {
break;
case Long:
- field = new
AjaxSpinnerFieldPanel.Builder<Long>().build(
+ field = new AjaxNumberFieldPanel.Builder<Long>().build(
"value",
label,
Long.class,
diff --git
a/client/idrepo/common-ui/src/main/resources/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.html
b/client/idrepo/common-ui/src/main/resources/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.html
deleted file mode 100644
index 3587e3f997..0000000000
---
a/client/idrepo/common-ui/src/main/resources/org/apache/syncope/client/ui/commons/markup/html/form/AjaxSpinnerFieldPanel.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">
- <wicket:extend>
- <wicket:enclosure child="field-label">
- <label wicket:id="field-label">[LABEL]</label><span
wicket:id="required"/>
- <span wicket:id="externalAction"/>
- </wicket:enclosure>
-
- <input wicket:id="spinner"/>
- </wicket:extend>
-</html>
diff --git
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java
index 9960f1f64c..a104710b92 100644
---
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java
+++
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/BeanPanel.java
@@ -52,8 +52,8 @@ import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateTimeFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxGridFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
import org.apache.syncope.common.lib.report.SearchCondition;
@@ -295,8 +295,8 @@ public class BeanPanel<T extends Serializable> extends
Panel {
if (ClassUtils.isAssignable(Boolean.class, type)) {
panel = new AjaxCheckBoxPanel(id, fieldName, model);
} else if (ClassUtils.isAssignable(Number.class, type)) {
- panel = new AjaxSpinnerFieldPanel.Builder<>().build(
- id, fieldName, (Class<Number>)
ClassUtils.resolvePrimitiveIfNecessary(type), model);
+ panel = new AjaxNumberFieldPanel.Builder<>().build(
+ id, fieldName,
AjaxNumberFieldPanel.cast(ClassUtils.resolvePrimitiveIfNecessary(type)), model);
} else if (Date.class.equals(type)) {
panel = new AjaxDateTimeFieldPanel(id, fieldName, model,
DateFormatUtils.ISO_8601_EXTENDED_DATETIME_TIME_ZONE_FORMAT);
diff --git
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainPoolModalPanel.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainPoolModalPanel.java
index f16d222ace..5d0bc9e661 100644
---
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainPoolModalPanel.java
+++
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainPoolModalPanel.java
@@ -22,7 +22,7 @@ import
org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.pages.BasePage;
import
org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.ui.commons.Constants;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import org.apache.syncope.common.keymaster.client.api.DomainOps;
import org.apache.syncope.common.keymaster.client.api.model.Domain;
import org.apache.wicket.PageReference;
@@ -43,12 +43,12 @@ public class DomainPoolModalPanel extends
AbstractModalPanel<Domain> {
super(modal, pageRef);
this.domain = domain;
- add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).build(
+ add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
"poolMaxActive",
"poolMaxActive",
Integer.class,
new PropertyModel<>(domain,
"poolMaxActive")).setRequired(true));
- add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).build(
+ add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
"poolMinIdle",
"poolMinIdle",
Integer.class,
diff --git
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainWizardBuilder.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainWizardBuilder.java
index afb235e854..b37ccbe711 100644
---
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainWizardBuilder.java
+++
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/DomainWizardBuilder.java
@@ -27,7 +27,7 @@ import
org.apache.syncope.client.console.wizards.BaseAjaxWizardBuilder;
import org.apache.syncope.client.ui.commons.Constants;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.EncryptedFieldPanel;
import org.apache.syncope.common.keymaster.client.api.DomainOps;
@@ -127,12 +127,12 @@ public class DomainWizardBuilder extends
BaseAjaxWizardBuilder<Domain> {
transactionIsolation.setNullValid(false);
add(transactionIsolation);
- add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).build(
+ add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
"poolMaxActive",
"poolMaxActive",
Integer.class,
new PropertyModel<>(domain,
"poolMaxActive")).addRequiredLabel());
- add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).build(
+ add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
"poolMinIdle",
"poolMinIdle",
Integer.class,
diff --git
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/ParametersWizardAttrStep.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/ParametersWizardAttrStep.java
index ef993cdb7f..895822ace9 100644
---
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/ParametersWizardAttrStep.java
+++
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/ParametersWizardAttrStep.java
@@ -25,7 +25,7 @@ import
org.apache.syncope.client.console.wicket.markup.html.form.BinaryFieldPane
import
org.apache.syncope.client.console.wicket.markup.html.form.MultiFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateTimeFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
import org.apache.syncope.client.ui.commons.wizards.AjaxWizard;
@@ -128,13 +128,13 @@ public class ParametersWizardAttrStep extends WizardStep {
break;
case Long:
- panel = new AjaxSpinnerFieldPanel.Builder<Long>().
+ panel = new AjaxNumberFieldPanel.Builder<Long>().
convertValuesToString(false).
build(id, valueHeaderName, Long.class, new Model<>());
break;
case Double:
- panel = new AjaxSpinnerFieldPanel.Builder<Double>().
+ panel = new AjaxNumberFieldPanel.Builder<Double>().
convertValuesToString(false).
build(id, valueHeaderName, Double.class, new
Model<>());
break;
diff --git
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/search/SearchClausePanel.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/search/SearchClausePanel.java
index 2802cfbdab..bed3245338 100644
---
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/search/SearchClausePanel.java
+++
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/panels/search/SearchClausePanel.java
@@ -47,7 +47,7 @@ import org.apache.syncope.client.ui.commons.SchemaUtils;
import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateTimeFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
import org.apache.syncope.common.lib.SyncopeConstants;
@@ -986,7 +986,7 @@ public class SearchClausePanel extends
FieldPanel<SearchClause> {
break;
case Long:
- value = new
AjaxSpinnerFieldPanel.Builder<Long>().enableOnChange().build(
+ value = new
AjaxNumberFieldPanel.Builder<Long>().enableOnChange().build(
"value",
"Value",
Long.class,
@@ -996,7 +996,7 @@ public class SearchClausePanel extends
FieldPanel<SearchClause> {
break;
case Double:
- value = new
AjaxSpinnerFieldPanel.Builder<Double>().enableOnChange().step(0.1).build(
+ value = new
AjaxNumberFieldPanel.Builder<Double>().enableOnChange().step(0.1).build(
"value",
"value",
Double.class,
diff --git
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java
index 85588a9401..d9557cac86 100644
---
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java
+++
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/policies/PolicyModalPanelBuilder.java
@@ -33,8 +33,8 @@ import org.apache.syncope.client.ui.commons.Constants;
import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.pages.BaseWebPage;
import org.apache.syncope.client.ui.commons.panels.WizardModalPanel;
@@ -161,7 +161,7 @@ public class PolicyModalPanelBuilder<T extends PolicyTO>
extends AbstractModalPa
switch (type) {
case ACCOUNT:
- fields.add(new
AjaxSpinnerFieldPanel.Builder<Integer>().min(1).build(
+ fields.add(new
AjaxNumberFieldPanel.Builder<Integer>().min(1).build(
"field",
"maxAuthenticationAttempts",
Integer.class,
@@ -180,7 +180,7 @@ public class PolicyModalPanelBuilder<T extends PolicyTO>
extends AbstractModalPa
break;
case PASSWORD:
- fields.add(new
AjaxSpinnerFieldPanel.Builder<Integer>().min(1).build(
+ fields.add(new
AjaxNumberFieldPanel.Builder<Integer>().min(1).build(
"field",
"historyLength",
Integer.class,
@@ -206,7 +206,7 @@ public class PolicyModalPanelBuilder<T extends PolicyTO>
extends AbstractModalPa
new PropertyModel<>(policyTO, "updateDelta"),
false));
- fields.add(new
AjaxSpinnerFieldPanel.Builder<Integer>().min(1).build(
+ fields.add(new
AjaxNumberFieldPanel.Builder<Integer>().min(1).build(
"field",
"maxAttempts",
Integer.class,
@@ -220,21 +220,21 @@ public class PolicyModalPanelBuilder<T extends PolicyTO>
extends AbstractModalPa
PropertyModel<String> backOffParamsModel = new
PropertyModel<>(policyTO, "backOffParams");
- AjaxSpinnerFieldPanel<Long> initialInterval = new
AjaxSpinnerFieldPanel.Builder<Long>().
+ AjaxNumberFieldPanel<Long> initialInterval = new
AjaxNumberFieldPanel.Builder<Long>().
min(1L).build(
"field",
"initialInterval",
Long.class,
new BackOffParamsModel<>(backOffParamsModel, 0));
fields.add(initialInterval.setOutputMarkupPlaceholderTag(true));
- AjaxSpinnerFieldPanel<Long> maxInterval = new
AjaxSpinnerFieldPanel.Builder<Long>().
+ AjaxNumberFieldPanel<Long> maxInterval = new
AjaxNumberFieldPanel.Builder<Long>().
min(1L).build(
"field",
"maxInterval",
Long.class,
new BackOffParamsModel<>(backOffParamsModel, 1));
fields.add(maxInterval.setOutputMarkupPlaceholderTag(true).setVisible(false));
- AjaxSpinnerFieldPanel<Double> multiplier = new
AjaxSpinnerFieldPanel.Builder<Double>().
+ AjaxNumberFieldPanel<Double> multiplier = new
AjaxNumberFieldPanel.Builder<Double>().
min(1D).build(
"field",
"multiplier",
@@ -310,7 +310,7 @@ public class PolicyModalPanelBuilder<T extends PolicyTO>
extends AbstractModalPa
break;
case ATTR_RELEASE:
- fields.add(new
AjaxSpinnerFieldPanel.Builder<Integer>().build(
+ fields.add(new
AjaxNumberFieldPanel.Builder<Integer>().build(
"field",
"order",
Integer.class,
@@ -339,9 +339,9 @@ public class PolicyModalPanelBuilder<T extends PolicyTO>
extends AbstractModalPa
private void showHide(
final AjaxDropDownChoicePanel<Serializable> backOffStrategy,
- final AjaxSpinnerFieldPanel<Long> initialInterval,
- final AjaxSpinnerFieldPanel<Long> maxInterval,
- final AjaxSpinnerFieldPanel<Double> multiplier) {
+ final AjaxNumberFieldPanel<Long> initialInterval,
+ final AjaxNumberFieldPanel<Long> maxInterval,
+ final AjaxNumberFieldPanel<Double> multiplier) {
BackOffStrategy strategy = (BackOffStrategy)
backOffStrategy.getField().getModelObject();
diff --git
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder.java
index bfd7705d29..0a10d24c59 100644
---
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder.java
+++
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder.java
@@ -34,8 +34,8 @@ import org.apache.syncope.client.ui.commons.Constants;
import
org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
import org.apache.syncope.common.lib.SyncopeConstants;
@@ -382,7 +382,7 @@ public class SchedTaskWizardBuilder<T extends SchedTaskTO>
extends BaseAjaxWizar
provisioningTaskSpecifics.add(enableConcurrentSettings.
setVisible(taskTO instanceof
ProvisioningTaskTO).setOutputMarkupId(true));
- FieldPanel<Integer> corePoolSize = new
AjaxSpinnerFieldPanel.Builder<Integer>().min(1).build(
+ FieldPanel<Integer> corePoolSize = new
AjaxNumberFieldPanel.Builder<Integer>().min(1).build(
"corePoolSize",
"corePoolSize",
Integer.class,
@@ -393,7 +393,7 @@ public class SchedTaskWizardBuilder<T extends SchedTaskTO>
extends BaseAjaxWizar
: false);
provisioningTaskSpecifics.add(corePoolSize);
- FieldPanel<Integer> maxPoolSize = new
AjaxSpinnerFieldPanel.Builder<Integer>().min(1).build(
+ FieldPanel<Integer> maxPoolSize = new
AjaxNumberFieldPanel.Builder<Integer>().min(1).build(
"maxPoolSize",
"maxPoolSize",
Integer.class,
@@ -404,7 +404,7 @@ public class SchedTaskWizardBuilder<T extends SchedTaskTO>
extends BaseAjaxWizar
: false);
provisioningTaskSpecifics.add(maxPoolSize);
- FieldPanel<Integer> queueCapacity = new
AjaxSpinnerFieldPanel.Builder<Integer>().min(1).build(
+ FieldPanel<Integer> queueCapacity = new
AjaxNumberFieldPanel.Builder<Integer>().min(1).build(
"queueCapacity",
"queueCapacity",
Integer.class,
diff --git
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractAttrsWizardStep.java
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractAttrsWizardStep.java
index 6e795a7987..61cad250b3 100644
---
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractAttrsWizardStep.java
+++
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/wizards/any/AbstractAttrsWizardStep.java
@@ -43,7 +43,7 @@ import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateTimeFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.EncryptedFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
@@ -268,7 +268,7 @@ public abstract class AbstractAttrsWizardStep<S extends
SchemaTO> extends Wizard
break;
case Long:
- panel = new
AjaxSpinnerFieldPanel.Builder<Long>().enableOnChange().build(
+ panel = new
AjaxNumberFieldPanel.Builder<Long>().enableOnChange().build(
"panel",
plainSchema.getLabel(SyncopeConsoleSession.get().getLocale()),
Long.class,
@@ -280,7 +280,7 @@ public abstract class AbstractAttrsWizardStep<S extends
SchemaTO> extends Wizard
break;
case Double:
- panel = new
AjaxSpinnerFieldPanel.Builder<Double>().enableOnChange().step(0.1).build(
+ panel = new
AjaxNumberFieldPanel.Builder<Double>().enableOnChange().step(0.1).build(
"panel",
plainSchema.getLabel(SyncopeConsoleSession.get().getLocale()),
Double.class,
diff --git
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java
index 1575a903f5..049e13e677 100644
---
a/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java
+++
b/client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/panels/any/PlainAttrs.java
@@ -36,7 +36,7 @@ import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDateTimeFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
-import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
+import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
import
org.apache.syncope.client.ui.commons.markup.html.form.EncryptedFieldPanel;
import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
@@ -264,7 +264,7 @@ public class PlainAttrs extends
AbstractAttrs<PlainSchemaTO> {
break;
case Long:
- panel = new
AjaxSpinnerFieldPanel.Builder<Long>().enableOnChange().build(
+ panel = new
AjaxNumberFieldPanel.Builder<Long>().enableOnChange().build(
"panel",
plainSchema.getLabel(SyncopeEnduserSession.get().getLocale()),
Long.class,
@@ -276,7 +276,7 @@ public class PlainAttrs extends
AbstractAttrs<PlainSchemaTO> {
break;
case Double:
- panel = new
AjaxSpinnerFieldPanel.Builder<Double>().enableOnChange().step(0.1).build(
+ panel = new
AjaxNumberFieldPanel.Builder<Double>().enableOnChange().step(0.1).build(
"panel",
plainSchema.getLabel(SyncopeEnduserSession.get().getLocale()),
Double.class,
diff --git
a/ext/scimv2/client-console/src/main/java/org/apache/syncope/client/console/panels/SCIMConfGeneralPanel.java
b/ext/scimv2/client-console/src/main/java/org/apache/syncope/client/console/panels/SCIMConfGeneralPanel.java
index bac7fcaa7a..6ae86631f5 100644
---
a/ext/scimv2/client-console/src/main/java/org/apache/syncope/client/console/panels/SCIMConfGeneralPanel.java
+++
b/ext/scimv2/client-console/src/main/java/org/apache/syncope/client/console/panels/SCIMConfGeneralPanel.java
@@ -66,16 +66,16 @@ public class SCIMConfGeneralPanel extends SCIMConfTabPanel {
}
},
DateFormatUtils.ISO_8601_EXTENDED_DATETIME_TIME_ZONE_FORMAT).setEnabled(false));
- add(new AjaxNumberFieldPanel.Builder<Integer>().enableOnChange().
- build("bulkMaxOperations", "bulkMaxOperations",
+ add(new
AjaxNumberFieldPanel.Builder<Integer>().enableOnChange().convertValuesToString(false).
+ build("bulkMaxOperations", "bulkMaxOperations", Integer.class,
new PropertyModel<>(scimGeneralConf,
"bulkMaxOperations")));
- add(new AjaxNumberFieldPanel.Builder<Integer>().enableOnChange().
- build("bulkMaxPayloadSize", "bulkMaxPayloadSize",
+ add(new
AjaxNumberFieldPanel.Builder<Integer>().enableOnChange().convertValuesToString(false).
+ build("bulkMaxPayloadSize", "bulkMaxPayloadSize",
Integer.class,
new PropertyModel<>(scimGeneralConf,
"bulkMaxPayloadSize")));
- add(new AjaxNumberFieldPanel.Builder<Integer>().enableOnChange().
- build("filterMaxResults", "filterMaxResults",
+ add(new
AjaxNumberFieldPanel.Builder<Integer>().enableOnChange().convertValuesToString(false).
+ build("filterMaxResults", "filterMaxResults", Integer.class,
new PropertyModel<>(scimGeneralConf,
"filterMaxResults")));
}
}
diff --git
a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
index 248e670c4f..3e060aae0a 100644
---
a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
+++
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/ParametersITCase.java
@@ -71,8 +71,7 @@ public class ParametersITCase extends AbstractConsoleITCase {
public void updateParameter() {
TESTER.assertComponent("body:content:parametersPanel",
WebMarkupContainer.class);
- Component result = findComponentByProp(SCHEMA,
"body:content:parametersPanel",
- "notification.maxRetries");
+ Component result = findComponentByProp(SCHEMA,
"body:content:parametersPanel", "notification.maxRetries");
assertNotNull(result);
TESTER.executeAjaxEvent(result.getPageRelativePath(),
Constants.ON_CLICK);
@@ -85,7 +84,8 @@ public class ParametersITCase extends AbstractConsoleITCase {
formTester = TESTER.newFormTester(
"body:content:parametersPanel:outerObjectsRepeater:0:outer:form");
-
formTester.setValue("content:parametersCreateWizardPanel:form:view:content:attrs:0:panel:spinner",
"70");
+ formTester.setValue(
+
"content:parametersCreateWizardPanel:form:view:content:attrs:0:panel:numberTextField",
"70");
formTester.submit("content:parametersCreateWizardPanel:form:buttons:finish");
diff --git
a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
index 79c27819c1..cd5d8a33b7 100644
---
a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
+++
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/PoliciesITCase.java
@@ -52,7 +52,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
FormTester formTester = TESTER.newFormTester(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:fields:0:field:textField", name);
- formTester.setValue("content:fields:1:field:spinner", "1");
+ formTester.setValue("content:fields:1:field:numberTextField", "1");
formTester.setValue("content:fields:2:field:checkboxField", true);
formTester.setValue("content:fields:3:field:paletteField:recorder",
"ws-target-resource-nopropagation4");
@@ -83,7 +83,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
+ ":content:fields:0:field:textField", name);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
- + ":content:fields:1:field:spinner", 1);
+ + ":content:fields:1:field:numberTextField", 1);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
+ ":content:fields:2:field:checkboxField", true);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
@@ -109,7 +109,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
FormTester formTester = TESTER.newFormTester(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
formTester.setValue("content:fields:0:field:textField", name);
- formTester.setValue("content:fields:1:field:spinner", "1");
+ formTester.setValue("content:fields:1:field:numberTextField", "1");
formTester.setValue("content:fields:2:field:checkboxField", true);
TESTER.clickLink(
@@ -136,7 +136,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
+ ":content:fields:0:field:textField", name);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
- + ":content:fields:1:field:spinner", 1);
+ + ":content:fields:1:field:numberTextField", 1);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
+ ":content:fields:2:field:checkboxField", true);
@@ -451,7 +451,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
FormTester formTester = TESTER.newFormTester(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
- formTester.setValue("content:fields:1:field:spinner", "2");
+ formTester.setValue("content:fields:1:field:numberTextField", "2");
TESTER.clickLink(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
@@ -474,7 +474,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
- + ":content:fields:1:field:spinner", 2);
+ + ":content:fields:1:field:numberTextField", 2);
TESTER.executeAjaxEvent(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:buttons:0:button",
@@ -553,7 +553,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
FormTester formTester = TESTER.newFormTester(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form");
- formTester.setValue("content:fields:1:field:spinner", "2");
+ formTester.setValue("content:fields:1:field:numberTextField", "2");
TESTER.clickLink(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:inputs:0:submit");
@@ -576,7 +576,7 @@ public class PoliciesITCase extends AbstractConsoleITCase {
Modal.class);
TESTER.assertModelValue("body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:form"
- + ":content:fields:1:field:spinner", 2);
+ + ":content:fields:1:field:numberTextField", 2);
TESTER.executeAjaxEvent(
"body:content:tabbedPanel:panel:outerObjectsRepeater:0:outer:dialog:footer:buttons:0:button",
diff --git
a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
index 8e77078fb3..38a8357509 100644
---
a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
+++
b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/UsersITCase.java
@@ -302,7 +302,7 @@ public class UsersITCase extends AbstractConsoleITCase {
Constants.ON_CLICK);
formTester.setValue("view:membershipsPlainSchemas:0:membershipPlainSchemas:tabs:0:body:content:"
- + "schemas:0:panel:spinner", "1");
+ + "schemas:0:panel:numberTextField", "1");
formTester.submit("buttons:next");
formTester = TESTER.newFormTester(TAB_PANEL +
"outerObjectsRepeater:0:outer:form:content:form");