empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject empire-db git commit: EMPIREDB-235 changed method access from private to protected
Date Sun, 21 Feb 2016 15:46:12 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master 7be35dd50 -> ab2aadc69


EMPIREDB-235
changed method access from private to protected

Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/ab2aadc6
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/ab2aadc6
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/ab2aadc6

Branch: refs/heads/master
Commit: ab2aadc6985342c4a78cee42edfd6d14f4546355
Parents: 7be35dd
Author: Rainer Döbele <doebele@esteam.de>
Authored: Sun Feb 21 16:46:08 2016 +0100
Committer: Rainer Döbele <doebele@esteam.de>
Committed: Sun Feb 21 16:46:08 2016 +0100

----------------------------------------------------------------------
 .../empire/jsf2/components/ControlTag.java      | 19 +++---
 .../apache/empire/jsf2/components/InputTag.java |  8 +--
 .../apache/empire/jsf2/components/LinkTag.java  | 17 +++--
 .../empire/jsf2/components/MenuItemTag.java     | 27 +++-----
 .../empire/jsf2/components/MenuListTag.java     | 22 +++----
 .../empire/jsf2/components/SelectTag.java       | 16 ++---
 .../empire/jsf2/components/TabViewTag.java      |  6 +-
 .../jsf2/controls/InputControlManager.java      | 18 ++++-
 .../empire/jsf2/controls/RadioInputControl.java | 69 +-------------------
 .../jsf2/controls/SelectInputControl.java       |  4 +-
 .../jsf2/controls/TextAreaInputControl.java     |  9 ---
 11 files changed, 76 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
index 19b7e35..297be1f 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/ControlTag.java
@@ -220,15 +220,14 @@ public class ControlTag extends UIInput implements NamingContainer
     // Logger
     private static final Logger       log                = LoggerFactory.getLogger(ControlTag.class);
 
-    private static final String       readOnlyState      = "readOnlyState";
-
-    private static final boolean      encodeLabel        = true;
+    protected static final String     readOnlyState      = "readOnlyState";
 
     protected final TagEncodingHelper helper             = new TagEncodingHelper(this, "eInput");
 
     protected InputControl            control            = null;
     protected InputControl.InputInfo  inpInfo            = null;
     protected boolean                 hasRequiredFlagSet = false;
+    protected boolean                 encodeLabel        = true;
     private   boolean                 creatingComponents = false;
 
     public ControlTag()
@@ -242,14 +241,14 @@ public class ControlTag extends UIInput implements NamingContainer
         return "javax.faces.NamingContainer";
     }
 
-    private void saveState()
+    protected void saveState()
     {
         // getStateHelper().put(inpControlPropName, control);
         // getStateHelper().put(inputInfoPropName, inpInfo);
         getStateHelper().put(ControlTag.readOnlyState, (this.inpInfo == null));
     }
 
-    private boolean initState(FacesContext context)
+    protected boolean initState(FacesContext context)
     {
         // Check read-Only
         Boolean ros = (Boolean) getStateHelper().get(ControlTag.readOnlyState);
@@ -271,7 +270,7 @@ public class ControlTag extends UIInput implements NamingContainer
      * remember original clientId
      * necessary only inside UIData
      */
-    private String treeClientId = null;
+    protected String treeClientId = null;
     
     @Override
     public boolean visitTree(VisitContext visitContext, VisitCallback callback) 
@@ -307,7 +306,7 @@ public class ControlTag extends UIInput implements NamingContainer
         boolean isCustomInput = isCustomInput();
 
         // create children
-        if (ControlTag.encodeLabel)
+        if (this.encodeLabel)
         {   // Create Label Separator Tag
             ControlSeparatorComponent labelSepTag = null;
             if (getChildCount() > 0)
@@ -449,7 +448,7 @@ public class ControlTag extends UIInput implements NamingContainer
         return false;
     }
 
-    private void encodeLabel(FacesContext context, UIComponentBase parent)
+    protected void encodeLabel(FacesContext context, UIComponentBase parent)
         throws IOException
     {
         // render components
@@ -477,7 +476,7 @@ public class ControlTag extends UIInput implements NamingContainer
         parent.encodeAll(context);
     }
 
-    private void encodeInput(FacesContext context, UIComponentBase parent)
+    protected void encodeInput(FacesContext context, UIComponentBase parent)
         throws IOException
     {
         // render components
@@ -643,7 +642,7 @@ public class ControlTag extends UIInput implements NamingContainer
         return helper.isValueRequired();
     }
 
-    private boolean isPartialSubmit(FacesContext context)
+    protected boolean isPartialSubmit(FacesContext context)
     {
         // Check Required Flag
         if (this.hasRequiredFlagSet && !isRequired())

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java
index 4d1111e..9bfcdc8 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/InputTag.java
@@ -44,7 +44,7 @@ public class InputTag extends UIInput implements NamingContainer
 
     // private static final String inpControlPropName = InputControl.class.getSimpleName();
     // private static final String inputInfoPropName = InputControl.InputInfo.class.getSimpleName();
-    private static final String       readOnlyState      = "readOnlyState";
+    protected static final String     readOnlyState      = "readOnlyState";
 
     protected final TagEncodingHelper helper             = new TagEncodingHelper(this, "eInput");
 
@@ -74,14 +74,14 @@ public class InputTag extends UIInput implements NamingContainer
         return "javax.faces.NamingContainer";
     }
 
-    private void saveState()
+    protected void saveState()
     {
         // getStateHelper().put(inpControlPropName, control);
         // getStateHelper().put(inputInfoPropName, inpInfo);
         getStateHelper().put(readOnlyState, (inpInfo == null));
     }
 
-    private boolean initState(FacesContext context)
+    protected boolean initState(FacesContext context)
     {
         // Check visibility
         if (helper.isVisible() == false)
@@ -316,7 +316,7 @@ public class InputTag extends UIInput implements NamingContainer
         return helper.isValueRequired();
     }
 
-    private boolean isPartialSubmit(FacesContext context)
+    protected boolean isPartialSubmit(FacesContext context)
     {
         // Check Required Flag
         if (hasRequiredFlagSet && !isRequired())

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java
index e0f88f0..eabb960 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/LinkTag.java
@@ -155,7 +155,7 @@ public class LinkTag extends UIOutput // implements NamingContainer
             if (linkComponent == null)
             {   try {
                     creatingComponents = true;
-                    linkComponent = new HtmlOutcomeTargetLink();
+                    linkComponent = createOutcomeTargetLink(context);
                     this.getChildren().add(0, linkComponent);
                     helper.saveComponentId(linkComponent);
                     // encode image
@@ -193,7 +193,7 @@ public class LinkTag extends UIOutput // implements NamingContainer
         return StringUtils.toString(getAttributes().get("styleClass"));
     }
     
-    private boolean isLinkDisabled()
+    protected boolean isLinkDisabled()
     {
         Object v = getAttributes().get("disabled");
         if (v==null)
@@ -202,7 +202,7 @@ public class LinkTag extends UIOutput // implements NamingContainer
         return ObjectUtils.getBoolean(v); 
     }
     
-    private Object getLinkValue(boolean hasColumn)
+    protected Object getLinkValue(boolean hasColumn)
     {
         // Is a column provided?
         if (hasColumn)
@@ -232,7 +232,7 @@ public class LinkTag extends UIOutput // implements NamingContainer
         }
     }
 
-    private void setLinkProperties(HtmlOutcomeTargetLink link)
+    protected void setLinkProperties(HtmlOutcomeTargetLink link)
     {
         boolean hasColumn = helper.hasColumn();
         Object value = getLinkValue(hasColumn);
@@ -261,7 +261,7 @@ public class LinkTag extends UIOutput // implements NamingContainer
         link.setIncludeViewParams(false);
     }
     
-    private void addOrSetParam(HtmlOutcomeTargetLink link, String attribute, String paramName)
+    protected void addOrSetParam(HtmlOutcomeTargetLink link, String attribute, String paramName)
     {
         // Get Attribute
         String paramValue = StringUtils.toString(getAttributes().get(attribute));
@@ -303,6 +303,13 @@ public class LinkTag extends UIOutput // implements NamingContainer
         helper.writeAttribute(writer, "title", helper.hasColumn() ? helper.getValueTooltip(title)
: title);
         return tagName;
     }
+
+    protected HtmlOutcomeTargetLink createOutcomeTargetLink(FacesContext context)
+    {
+        // OutcomeTargetLink link 
+        HtmlOutcomeTargetLink link = InputControlManager.createComponent(context, HtmlOutcomeTargetLink.class);
+        return link;
+    }
     
     protected HtmlGraphicImage encodeImage(FacesContext context, HtmlOutcomeTargetLink parent,
String imagePath)
     {

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuItemTag.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuItemTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuItemTag.java
index b6982bd..d4026bc 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuItemTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuItemTag.java
@@ -36,23 +36,12 @@ public class MenuItemTag extends LinkTag
     // Logger
     private static final Logger log = LoggerFactory.getLogger(MenuItemTag.class);
     
-    private MenuListTag parentMenu = null;
-    private String menuId;
+    protected MenuListTag parentMenu = null;
+    protected String menuId;
 
-    /*
-    private static int itemIdSeq = 0;
-    private final int itemId;
-    */
-    
     public MenuItemTag()
     {
         super();
-        // Debug stuff
-        /*
-        itemId = ++itemIdSeq;
-        if (log.isDebugEnabled())
-            log.debug("MenuId {} created", itemId);
-        */    
     }
 
     @Override
@@ -170,7 +159,7 @@ public class MenuItemTag extends LinkTag
         return null;
     }
     
-    private boolean isCurrent()
+    protected boolean isCurrent()
     {
         if (menuId==null || parentMenu==null || parentMenu.getCurrentId()==null)
             return false;
@@ -178,7 +167,7 @@ public class MenuItemTag extends LinkTag
         return menuId.equals(parentMenu.getCurrentId());
     }
     
-    private boolean isParent()
+    protected boolean isParent()
     {
         if (menuId==null || parentMenu==null || parentMenu.getCurrentId()==null)
             return false;
@@ -187,7 +176,7 @@ public class MenuItemTag extends LinkTag
         return (currentId.length()>menuId.length() && currentId.startsWith(menuId));
     }
 
-    private boolean isDisabled()
+    protected boolean isDisabled()
     {
         Object value = helper.getTagAttributeValue("disabled");
         if (value!=null)
@@ -195,7 +184,7 @@ public class MenuItemTag extends LinkTag
         return false;
     }
 
-    private boolean isExpanded()
+    protected boolean isExpanded()
     {
         Object value = helper.getTagAttributeValue("expanded");
         boolean auto = false;
@@ -233,7 +222,7 @@ public class MenuItemTag extends LinkTag
         return super.isRendered();
     }
     
-    private String getStyleClass()
+    protected String getStyleClass()
     {
         String styleClass = helper.getTagAttributeString("styleClass");
         if (parentMenu!=null)
@@ -262,7 +251,7 @@ public class MenuItemTag extends LinkTag
         return styleClass;
     }
     
-    private String appendStyleClass(String styleClass, String newClass)
+    protected String appendStyleClass(String styleClass, String newClass)
     {
         if (StringUtils.isEmpty(newClass))
             return styleClass;

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuListTag.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuListTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuListTag.java
index 3350c7e..8689ef4 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuListTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/MenuListTag.java
@@ -37,16 +37,16 @@ public class MenuListTag extends UIOutput implements NamingContainer
     
     protected final TagEncodingHelper helper = new TagEncodingHelper(this, "eMenuList");
     
-    private String currentId = null; 
-    private String currentClass = null; 
-    // private String prevMenuId = null; 
-    // private String enabledClass = null; 
-    private String parentClass = null;
-    private String disabledClass = null; 
-    private String expandedClass = null;
-    private String itemWrapTag = null;
-    private String defaultItemClass = null; // e.g. "level{}"
-    private int level = 0;
+    protected String currentId = null; 
+    protected String currentClass = null; 
+    // protected String prevMenuId = null; 
+    // protected String enabledClass = null; 
+    protected String parentClass = null;
+    protected String disabledClass = null; 
+    protected String expandedClass = null;
+    protected String itemWrapTag = null;
+    protected String defaultItemClass = null; // e.g. "level{}"
+    protected int level = 0;
 
     @Override
     public String getFamily()
@@ -101,7 +101,7 @@ public class MenuListTag extends UIOutput implements NamingContainer
         writer.endElement("ul");
     }
     
-    private void initMenuAttributes(FacesContext context)
+    protected void initMenuAttributes(FacesContext context)
     {        
         currentId       = helper.getTagAttributeString("currentId"); 
         currentClass    = helper.getTagAttributeString("currentClass"); 

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/SelectTag.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/SelectTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/SelectTag.java
index e75b54f..d4a0c9e 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/SelectTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/SelectTag.java
@@ -163,7 +163,7 @@ public class SelectTag extends UIInput implements NamingContainer
         super.validate(context);
     }
 
-    private UIInput getInputComponent()
+    protected UIInput getInputComponent()
     {
         if (getChildren().size() == 0)
         {
@@ -173,7 +173,7 @@ public class SelectTag extends UIInput implements NamingContainer
         return (UIInput) getChildren().get(0);
     }
 
-    private Options getOptionList()
+    protected Options getOptionList()
     {
         Object options = getAttributes().get("options");
         if (!(options instanceof Options))
@@ -183,25 +183,25 @@ public class SelectTag extends UIInput implements NamingContainer
         return ((Options) options);
     }
 
-    private boolean isAllowNull()
+    protected boolean isAllowNull()
     {
         Object allowNull = getAttributes().get("allowNull");
         return ObjectUtils.getBoolean(allowNull);
     }
 
-    private String getNullText()
+    protected String getNullText()
     {
         Object nullText = getAttributes().get("nullText");
         return StringUtils.toString(nullText, "");
     }
 
-    private boolean isDisabled()
+    protected boolean isDisabled()
     {
         Object disabled = getAttributes().get("disabled");
         return ObjectUtils.getBoolean(disabled);
     }
 
-    private UIInput createSelectOneMenu(TextResolver textResolver)
+    protected UIInput createSelectOneMenu(TextResolver textResolver)
     {
         this.control = (SelectInputControl) InputControlManager.getControl(SelectInputControl.NAME);
         HtmlSelectOneMenu input = control.createMenuComponent(this);
@@ -227,7 +227,7 @@ public class SelectTag extends UIInput implements NamingContainer
         return input;
     }
 
-    private void setInputValue(HtmlSelectOneMenu input)
+    protected void setInputValue(HtmlSelectOneMenu input)
     {
         Object value = getValue();
         if (value != null)
@@ -240,7 +240,7 @@ public class SelectTag extends UIInput implements NamingContainer
         input.setValue(value);
     }
 
-    private void copyAttributes(HtmlSelectOneMenu input)
+    protected void copyAttributes(HtmlSelectOneMenu input)
     {
         // set id
         String inputId = this.getId();

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/TabViewTag.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/TabViewTag.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/TabViewTag.java
index ba5650e..584c8ba 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/TabViewTag.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/components/TabViewTag.java
@@ -218,7 +218,7 @@ public class TabViewTag extends UIOutput implements NamingContainer
     }
     */
 
-    private void encodeTabs(FacesContext context, ResponseWriter writer)
+    protected void encodeTabs(FacesContext context, ResponseWriter writer)
         throws IOException
     {
         Iterator<UIComponent> ci = getFacetsAndChildren();
@@ -280,7 +280,7 @@ public class TabViewTag extends UIOutput implements NamingContainer
         }
     }
 
-    private void encodeTabLink(FacesContext context, ResponseWriter writer, int index, TabPageTag
page, boolean disabled)
+    protected void encodeTabLink(FacesContext context, ResponseWriter writer, int index,
TabPageTag page, boolean disabled)
         throws IOException
     {
         // Add component
@@ -325,7 +325,7 @@ public class TabViewTag extends UIOutput implements NamingContainer
         link.setRendered(false); // Don't render twice!
     }
 
-    private HtmlCommandLink createCommandLink(FacesContext context, String linkId)
+    protected HtmlCommandLink createCommandLink(FacesContext context, String linkId)
     {
         // CommandLink link 
         HtmlCommandLink link = InputControlManager.createComponent(context, HtmlCommandLink.class);

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControlManager.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControlManager.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControlManager.java
index c2fc8f7..9b309fa 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControlManager.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/InputControlManager.java
@@ -27,6 +27,7 @@ import javax.faces.context.FacesContext;
 
 import org.apache.empire.commons.StringUtils;
 import org.apache.empire.exceptions.InternalException;
+import org.apache.empire.exceptions.InvalidArgumentException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -150,7 +151,22 @@ public final class InputControlManager
         }
         // otherwise ask the application
         return (T) context.getApplication().createComponent(type);
-
+    }
+    
+    public static void registerComponentType(Class<? extends UIComponent> componentClass,
String componentType)
+    {
+        if (componentClass==null)
+            throw new InvalidArgumentException("componentClass", componentClass);
+        if (StringUtils.isNotEmpty(componentType))
+        {   // add
+            log.debug("registering Component type {} for {}", componentType, componentClass.getName());
+            componentTypeMap.put(componentClass, componentType);
+        }
+        else
+        {   // remove
+            log.debug("unregisterin Component type {} for {}", componentType, componentClass.getName());
+            componentTypeMap.remove(componentClass);
+        }
     }
 
 }

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/RadioInputControl.java
----------------------------------------------------------------------
diff --git a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/RadioInputControl.java
b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/RadioInputControl.java
index 9726bc5..43ce5f1 100644
--- a/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/RadioInputControl.java
+++ b/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/RadioInputControl.java
@@ -183,7 +183,7 @@ public class RadioInputControl extends InputControl
         syncOptions(input, ii.getTextResolver(), options, addEmpty, nullText);
     }
 
-    private boolean getEmptyEntryRequired(InputInfo ii, boolean disabled)
+    protected boolean getEmptyEntryRequired(InputInfo ii, boolean disabled)
     {
         if (!ii.isRequired() && !(disabled && ii.getColumn().isRequired()))
         {
@@ -289,7 +289,7 @@ public class RadioInputControl extends InputControl
         input.getChildren().add(selectItem);
     }
 
-    private String getNullText(InputInfo ii)
+    protected String getNullText(InputInfo ii)
     {
         String nullText = getFormatString(ii, InputControl.FORMAT_NULL, InputControl.FORMAT_NULL_ATTRIBUTE);
         return (nullText != null) ? ii.getText(nullText) : "";
@@ -369,69 +369,4 @@ public class RadioInputControl extends InputControl
         return value;
     }
 
-    /*
-    @Override
-    public void renderInput(ResponseWriter writer, ControlInfo ci)
-    {
-        boolean disabled = ci.getDisabled();
-    
-        HtmlTag input = writer.startTag("select");
-        input.addAttribute("id",    ci.getId());
-        input.addAttribute("class", ci.getCssClass());
-        input.addAttribute("style", ci.getCssStyle());
-        if (disabled)
-        {
-            input.addAttribute("disabled");
-        } else
-        {
-            input.addAttribute("name", ci.getName());
-        }
-        // Event Attributes
-        input.addAttribute("onclick",   ci.getOnclick());
-        input.addAttribute("onchange",  ci.getOnchange());
-        input.addAttribute("onfocus",   ci.getOnfocus());
-        input.addAttribute("onblur",    ci.getOnblur());
-        input.beginBody(true);
-        // Render List of Options
-        Options options = ci.getOptions();
-        if (options!=null)
-        {   // Render option list
-            Object current = ci.getValue();
-            if (hasFormatOption(ci, "allownull") && options.contains(null)==false)
-            {   // add an empty entry
-                addEmtpyEntry(writer, ObjectUtils.isEmpty(current));
-            }
-            for (OptionEntry entry : options)
-            {
-                Object value = entry.getValue();
-                boolean isCurrent = ObjectUtils.compareEqual(current, value);
-                if (isCurrent == false && disabled)
-                    continue; // 
-                // Add Option entry
-                HtmlTag option = writer.startTag("option");
-                option.addAttributeNoCheck("value", value, true);
-                option.addAttribute("selected", isCurrent);
-                option.beginBody(ci.getTranslation(entry.getText()));
-                option.endTag(true);
-            }
-        }
-        else
-        {   // No Option list available
-            log.error("No options available for select input control.");
-        }
-        // done
-        input.endTag();
-    }
-    
-    private void addEmtpyEntry(HtmlWriter writer, boolean isCurrent)
-    {
-        // Add Option entry
-        HtmlTag option = writer.startTag("option");
-        option.addAttributeNoCheck("value", "", false);
-        option.addAttribute("selected", isCurrent);
-        option.beginBody("");
-        option.endTag(true);
-    }
-    */
-
 }

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/SelectInputControl.java
----------------------------------------------------------------------
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 22378f4..b1804ff 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
@@ -135,7 +135,7 @@ public class SelectInputControl extends InputControl
         syncOptions(input, ii.getTextResolver(), options, addEmpty, nullText, ii.isInsideUIData());
     }
 
-    private boolean getEmptyEntryRequired(InputInfo ii, boolean disabled)
+    protected boolean getEmptyEntryRequired(InputInfo ii, boolean disabled)
     {
         if (!ii.isRequired() && !(disabled && ii.getColumn().isRequired()))
         {
@@ -249,7 +249,7 @@ public class SelectInputControl extends InputControl
         addSelectItem(input, textResolver, e, -1);
     }
     
-    private String getNullText(InputInfo ii)
+    protected String getNullText(InputInfo ii)
     {
         String nullText = getFormatString(ii, InputControl.FORMAT_NULL, InputControl.FORMAT_NULL_ATTRIBUTE);
         return (nullText != null) ? ii.getText(nullText) : "";

http://git-wip-us.apache.org/repos/asf/empire-db/blob/ab2aadc6/empire-db-jsf2/src/main/java/org/apache/empire/jsf2/controls/TextAreaInputControl.java
----------------------------------------------------------------------
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 37d6ade..ccbe3ca 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
@@ -141,14 +141,5 @@ public class TextAreaInputControl extends InputControl
         // Done 
         return value; 
     }
-
-    /*
-    private int getTextareaCols(InputInfo ii)
-    {
-        ii.getColumn().getAttribute("");
-    }
-    */
-    
-    
     
 }


Mime
View raw message