Skip to content

Commit efa3a60

Browse files
committed
[SYNCOPE-1832] AjaxSpinnerFieldPanel -> AjaxNumberFieldPanel
1 parent 0302122 commit efa3a60

File tree

25 files changed

+280
-438
lines changed

25 files changed

+280
-438
lines changed

client/am/console/src/main/java/org/apache/syncope/client/console/clientapps/ClientAppModalPanelBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
import org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
4848
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
4949
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
50+
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
5051
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
51-
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
5252
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
5353
import org.apache.syncope.client.ui.commons.pages.BaseWebPage;
5454
import org.apache.syncope.client.ui.commons.panels.WizardModalPanel;
@@ -205,7 +205,7 @@ protected Iterator<String> getChoices(final String input) {
205205
max(Comparator.comparing(ClientAppTO::getClientAppId)).
206206
ifPresent(app -> clientAppTO.setClientAppId(app.getClientAppId() + 1));
207207
}
208-
fields.add(new AjaxSpinnerFieldPanel.Builder<Long>().build(
208+
fields.add(new AjaxNumberFieldPanel.Builder<Long>().build(
209209
"field", "clientAppId", Long.class,
210210
new PropertyModel<>(clientAppTO, "clientAppId")).setRequired(true));
211211

@@ -434,7 +434,7 @@ public void setObject(final String object) {
434434
requiredNameIdFormat.addRequiredLabel().setEnabled(true);
435435
fields.add(requiredNameIdFormat);
436436

437-
fields.add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).build(
437+
fields.add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
438438
"field", "skewAllowance", Integer.class,
439439
new PropertyModel<>(clientAppTO, "skewAllowance")));
440440

client/am/console/src/main/java/org/apache/syncope/client/console/panels/SRARouteWizardBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.apache.syncope.client.ui.commons.Constants;
2828
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
2929
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
30-
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
30+
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
3131
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
3232
import org.apache.syncope.common.lib.to.SRARouteTO;
3333
import org.apache.syncope.common.lib.types.SRARouteType;
@@ -154,7 +154,7 @@ public void setObject(final String object) {
154154

155155
add(new AjaxCheckBoxPanel("csrf", "csrf", new PropertyModel<>(route, "csrf")));
156156

157-
add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).build(
157+
add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).build(
158158
"order", "order", Integer.class, new PropertyModel<>(route, "order")).
159159
setRequired(true));
160160
}

client/am/console/src/main/java/org/apache/syncope/client/console/policies/AttrReleasePolicyModalPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
3232
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
3333
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxGridFieldPanel;
34+
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
3435
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
35-
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
3636
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
3737
import org.apache.syncope.client.ui.commons.pages.BaseWebPage;
3838
import org.apache.syncope.common.lib.policy.AttrReleasePolicyTO;
@@ -120,7 +120,7 @@ public AttrReleasePolicyModalPanel(
120120
new PropertyModel<>(model.getObject().getConf(), "principalAttrRepoConf.ignoreResolvedAttributes"),
121121
false));
122122

123-
add(new AjaxSpinnerFieldPanel.Builder<Long>().build(
123+
add(new AjaxNumberFieldPanel.Builder<Long>().build(
124124
"expiration",
125125
"expiration",
126126
Long.class,

client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AttrRepoWizardBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.apache.syncope.client.console.wizards.mapping.AttrRepoMappingPanel;
2929
import org.apache.syncope.client.ui.commons.Constants;
3030
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
31-
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
31+
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
3232
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
3333
import org.apache.syncope.client.ui.commons.wizards.AjaxWizard;
3434
import org.apache.syncope.common.lib.attr.AttrRepoConf;
@@ -125,7 +125,7 @@ Constants.DESCRIPTION_FIELD_NAME, getString(Constants.DESCRIPTION_FIELD_NAME),
125125
state.setNullValid(false);
126126
add(state);
127127

128-
add(new AjaxSpinnerFieldPanel.Builder<Integer>().build(
128+
add(new AjaxNumberFieldPanel.Builder<Integer>().build(
129129
"order",
130130
"order",
131131
Integer.class,

client/am/console/src/main/java/org/apache/syncope/client/console/wizards/AuthModuleWizardBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
3131
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
3232
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
33-
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
33+
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
3434
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
3535
import org.apache.syncope.client.ui.commons.wizards.AjaxWizard;
3636
import org.apache.syncope.common.lib.AbstractLDAPConf;
@@ -129,7 +129,7 @@ Constants.DESCRIPTION_FIELD_NAME, getString(Constants.DESCRIPTION_FIELD_NAME),
129129
state.setNullValid(false);
130130
add(state);
131131

132-
add(new AjaxSpinnerFieldPanel.Builder<Integer>().build(
132+
add(new AjaxNumberFieldPanel.Builder<Integer>().build(
133133
"order",
134134
"order",
135135
Integer.class,

client/idm/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/list/ConnConfPropertyListView.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
import org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
3131
import org.apache.syncope.client.ui.commons.markup.html.form.AbstractFieldPanel;
3232
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
33+
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
3334
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPasswordFieldPanel;
34-
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
3535
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
3636
import org.apache.syncope.client.ui.commons.markup.html.form.FieldPanel;
3737
import org.apache.syncope.common.lib.types.ConnConfProperty;
@@ -100,9 +100,8 @@ protected void populateItem(final ListItem<ConnConfProperty> item) {
100100
}
101101

102102
if (ClassUtils.isAssignable(Number.class, propertySchemaClass)) {
103-
@SuppressWarnings("unchecked")
104-
Class<Number> numberClass = (Class<Number>) propertySchemaClass;
105-
field = new AjaxSpinnerFieldPanel.Builder<>().build("panel", label, numberClass, new Model<>());
103+
field = new AjaxNumberFieldPanel.Builder<>().build(
104+
"panel", label, AjaxNumberFieldPanel.cast(propertySchemaClass), new Model<>());
106105
required = property.getSchema().isRequired();
107106
} else if (ClassUtils.isAssignable(Boolean.class, propertySchemaClass)) {
108107
field = new AjaxCheckBoxPanel("panel", label, new Model<>());

client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ConnectorDetailsPanel.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.apache.syncope.client.ui.commons.Constants;
3131
import org.apache.syncope.client.ui.commons.ajax.form.IndicatorAjaxFormComponentUpdatingBehavior;
3232
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
33-
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
33+
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
3434
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
3535
import org.apache.syncope.common.lib.to.ConnIdBundle;
3636
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -180,27 +180,27 @@ protected void onUpdate(final AjaxRequestTarget target) {
180180
connInstanceTO.setPoolConf(new ConnPoolConf());
181181
}
182182

183-
add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
183+
add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
184184
"connRequestTimeout", "connRequestTimeout", Integer.class,
185185
new PropertyModel<>(connInstanceTO, "connRequestTimeout")));
186186

187-
add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
187+
add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
188188
"poolMaxObjects", "poolMaxObjects", Integer.class,
189189
new PropertyModel<>(connInstanceTO.getPoolConf(), "maxObjects")));
190190

191-
add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
191+
add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
192192
"poolMinIdle", "poolMinIdle", Integer.class,
193193
new PropertyModel<>(connInstanceTO.getPoolConf(), "minIdle")));
194194

195-
add(new AjaxSpinnerFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
195+
add(new AjaxNumberFieldPanel.Builder<Integer>().min(0).max(Integer.MAX_VALUE).build(
196196
"poolMaxIdle", "poolMaxIdle", Integer.class,
197197
new PropertyModel<>(connInstanceTO.getPoolConf(), "maxIdle")));
198198

199-
add(new AjaxSpinnerFieldPanel.Builder<Long>().min(0L).max(Long.MAX_VALUE).build(
199+
add(new AjaxNumberFieldPanel.Builder<Long>().min(0L).max(Long.MAX_VALUE).build(
200200
"poolMaxWait", "poolMaxWait", Long.class,
201201
new PropertyModel<>(connInstanceTO.getPoolConf(), "maxWait")));
202202

203-
add(new AjaxSpinnerFieldPanel.Builder<Long>().min(0L).max(Long.MAX_VALUE).build(
203+
add(new AjaxNumberFieldPanel.Builder<Long>().min(0L).max(Long.MAX_VALUE).build(
204204
"poolMinEvictableIdleTime", "poolMinEvictableIdleTime", Long.class,
205205
new PropertyModel<>(connInstanceTO.getPoolConf(), "minEvictableIdleTimeMillis")));
206206
}

client/idm/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceDetailsPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import org.apache.syncope.client.ui.commons.Constants;
2929
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxCheckBoxPanel;
3030
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxDropDownChoicePanel;
31+
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxNumberFieldPanel;
3132
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxPalettePanel;
32-
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxSpinnerFieldPanel;
3333
import org.apache.syncope.client.ui.commons.markup.html.form.AjaxTextFieldPanel;
3434
import org.apache.syncope.common.lib.to.ConnInstanceTO;
3535
import org.apache.syncope.common.lib.to.ImplementationTO;
@@ -102,7 +102,7 @@ public ResourceDetailsPanel(final ResourceTO resourceTO, final boolean createFla
102102
new PropertyModel<>(resourceTO, "enforceMandatoryCondition"),
103103
false));
104104

105-
container.add(new AjaxSpinnerFieldPanel.Builder<Integer>().build(
105+
container.add(new AjaxNumberFieldPanel.Builder<Integer>().build(
106106
"propagationPriority",
107107
"propagationPriority",
108108
Integer.class,

0 commit comments

Comments
 (0)