Class Workarounds.OptionalParameterValue
- java.lang.Object
-
- org.ametys.web.frontoffice.search.Workarounds.OptionalParameterValue
-
- Enclosing class:
- Workarounds
public static final class Workarounds.OptionalParameterValue extends Object
For https://issues.ametys.org/browse/CMS-9541
When fixed, remove this class.
What is happening is that currently, Ametys cannot see the difference between an empty value for an optional parameter (not present in purpose) and the absence of the value because it is a 'new' parameter (user never had the opportunity to fill it).
Thus, as the optional parameter defines a default value, when editing the service, the default value is automatically filled for those parameters which are empty whereas we do not want.
-
-
Constructor Summary
Constructors Constructor Description OptionalParameterValue()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isNotEmpty(Integer value)
Returnstrue
if the value is considered non-empty.
-
-
-
Constructor Detail
-
OptionalParameterValue
public OptionalParameterValue()
-
-
Method Detail
-
isNotEmpty
public static final boolean isNotEmpty(Integer value)
Returnstrue
if the value is considered non-empty.
Because of the workaround, 0 actually means "empty"- Parameters:
value
- The value got from the storage- Returns:
true
if the value is considered non-empty
-
-