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 do...@apache.org on 2021/04/22 11:50:27 UTC
[empire-db] branch master updated: EMPIREDB-345
This is an automated email from the ASF dual-hosted git repository.
doebele 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 ab1076e EMPIREDB-345
ab1076e is described below
commit ab1076ec9bbffe3d1813cd3ce8da47b600e96ff4
Author: Rainer Döbele <do...@apache.org>
AuthorDate: Thu Apr 22 13:50:23 2021 +0200
EMPIREDB-345
---
.../empire/jsf2/controls/TextAreaInputControl.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/TextAreaInputControl.java b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/TextAreaInputControl.java
index ae7aceb..ed890d5 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/TextAreaInputControl.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/TextAreaInputControl.java
@@ -18,6 +18,7 @@
*/
package org.apache.empire.jsf2.controls;
+import java.io.IOException;
import java.util.List;
import javax.faces.component.UIComponent;
@@ -29,6 +30,7 @@ import org.apache.empire.commons.ObjectUtils;
import org.apache.empire.commons.StringUtils;
import org.apache.empire.exceptions.InvalidArgumentException;
import org.apache.empire.exceptions.UnexpectedReturnValueException;
+import org.apache.empire.jsf2.controls.InputControl.ValueInfo;
public class TextAreaInputControl extends InputControl
{
@@ -54,6 +56,22 @@ public class TextAreaInputControl extends InputControl
{
this(NAME, javax.faces.component.html.HtmlInputTextarea.class);
}
+
+ @Override
+ public void renderValue(UIComponent comp, String tagName, String styleClass, String tooltip, ValueInfo vi, FacesContext context)
+ throws IOException
+ {
+ // cols
+ int cols = getFormatInteger(vi, FORMAT_COLS, FORMAT_COLS_ATTRIBUTE);
+ if (cols>0)
+ styleClass += " cols"+String.valueOf(cols);
+ // rows
+ int rows = getFormatInteger(vi, FORMAT_ROWS, FORMAT_ROWS_ATTRIBUTE);
+ if (rows>0)
+ styleClass += " rows"+String.valueOf(rows);
+ // render
+ super.renderValue(comp, tagName, styleClass, tooltip, vi, context);
+ }
@Override
protected void createInputComponents(UIComponent parent, InputInfo ii, FacesContext context, List<UIComponent> compList)