You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/09/14 12:15:45 UTC
[isis] branch master updated: ISIS-3203: hotfix: override isRequired->false
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new cadf6f3061 ISIS-3203: hotfix: override isRequired->false
cadf6f3061 is described below
commit cadf6f3061f062b2ed7b0285957c543729d8c231
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Sep 14 14:15:39 2022 +0200
ISIS-3203: hotfix: override isRequired->false
- otherwise just won't work at all
---
.../org/apache/isis/viewer/wicket/ui/util/Wkt.java | 40 ++++++++++++----------
1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/util/Wkt.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/util/Wkt.java
index f2c2d2a5a6..37f240f9a0 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/util/Wkt.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/util/Wkt.java
@@ -18,7 +18,6 @@
*/
package org.apache.isis.viewer.wicket.ui.util;
-import java.util.Collections;
import java.util.List;
import java.util.OptionalInt;
import java.util.function.Supplier;
@@ -574,25 +573,30 @@ public class Wkt {
final IModel<List<FileUpload>> model) {
val fileUploadField = new BootstrapFileInputField(id, model) {
private static final long serialVersionUID = 1L;
+// @Override
+// public void convertInput() {
+// super.convertInput(); // keep side-effects
+// if(!isRequired()) {return;}
+// /*[ISIS-3203]: in the context of mandatory property or action parameter negotiation,
+// * we need to set the converted input to something other than null, even an empty list will do
+// */
+// if(isConvertedInputNull()
+// && !isModelEmpty()) {
+// super.setConvertedInput(Collections.emptyList()); // always pass
+// }
+// }
+// @Override
+// public boolean checkRequired() {
+// super.checkRequired(); // keep side-effects
+// return true; // always pass otherwise workaround won't work
+// }
+// private boolean isModelEmpty() { return getModel().getObject()==null; }
+// private boolean isConvertedInputNull() { return getConvertedInput()==null; }
@Override
- public void convertInput() {
- super.convertInput(); // keep side-effects
- if(!isRequired()) {return;}
- /*[ISIS-3203]: in the context of mandatory property or action parameter negotiation,
- * we need to set the converted input to something other than null, even an empty list will do
- */
- if(isConvertedInputNull()
- && !isModelEmpty()) {
- super.setConvertedInput(Collections.emptyList()); // always pass
- }
- }
- @Override
- public boolean checkRequired() {
- super.checkRequired(); // keep side-effects
- return true; // always pass otherwise workaround won't work
+ public boolean isRequired() {
+ //FIXME[ISIS-3203]
+ return false; // nothing else worked yet
}
- private boolean isModelEmpty() { return getModel().getObject()==null; }
- private boolean isConvertedInputNull() { return getConvertedInput()==null; }
};
fileUploadField.getConfig()
.maxFileCount(1)