You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by de...@apache.org on 2019/07/24 08:27:11 UTC
[empire-db] branch master updated: EMPIREDB-298
This is an automated email from the ASF dual-hosted git repository.
derjan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git
The following commit(s) were added to refs/heads/master by this push:
new 8a853d7 EMPIREDB-298
8a853d7 is described below
commit 8a853d72b25ce12ee916a5bfbeb5f50f84b760c7
Author: Jan Glaubitz <ja...@glaubitz.org>
AuthorDate: Wed Jul 24 10:26:45 2019 +0200
EMPIREDB-298
---
.../src/main/java/org/apache/empire/jsf2/controls/InputControl.java | 5 ++++-
.../java/org/apache/empire/jsf2/controls/SelectInputControl.java | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
index 63cf2de..2d1e7a3 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControl.java
@@ -71,6 +71,9 @@ public abstract class InputControl
// HTML
public static String HTML_EXPR_NBSP = " ";
+
+ // style classes
+ public static final String STYLECLASS_REQUIRED = "eInpReq";
public InputControl()
{
@@ -530,7 +533,7 @@ public abstract class InputControl
protected final void copyAttributes(UIComponent parent, InputInfo ii, UIInput input)
{
- copyAttributes(parent, ii, input, (ii.isRequired() ? "eInpReq" : null));
+ copyAttributes(parent, ii, input, (ii.isRequired() ? STYLECLASS_REQUIRED : null));
}
protected void copyAttribute(InputInfo ii, UIInput input, String name)
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java
index 9d3e818..e6222ce 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java
@@ -108,6 +108,8 @@ public class SelectInputControl extends InputControl
throw new UnexpectedReturnValueException(comp.getClass().getName(), "parent.getChildren()");
}
HtmlSelectOneMenu input = (HtmlSelectOneMenu)comp;
+ // required
+ addRemoveStyle(input, " " + InputControl.STYLECLASS_REQUIRED, ii.isRequired());
// disabled
boolean disabled = ii.isDisabled();
input.setDisabled(disabled);