You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by pr...@apache.org on 2005/11/22 22:13:19 UTC

svn commit: r348252 - in /myfaces/tomahawk/trunk/src/java/org/apache/myfaces: component/html/ext/HtmlSelectManyCheckbox.java taglib/html/ext/HtmlMessageTag.java

Author: prophecy
Date: Tue Nov 22 13:13:17 2005
New Revision: 348252

URL: http://svn.apache.org/viewcvs?rev=348252&view=rev
Log:
- added SelectBooleanAjax component
- added Sandbox message tag 
- rolled back some changes to UIComponentTag

Modified:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckbox.java
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlMessageTag.java

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckbox.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckbox.java?rev=348252&r1=348251&r2=348252&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckbox.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlSelectManyCheckbox.java Tue Nov 22 13:13:17 2005
@@ -40,6 +40,7 @@
         String clientId = HtmlComponentUtils.getClientId(this, getRenderer(context), context);
         if (clientId == null)
         {
+            System.out.println("Getting new id for " + this.getId() + " NOT FORCED");
             clientId = super.getClientId(context);
         }
 
@@ -145,7 +146,7 @@
 
     public Object saveState(FacesContext context)
     {
-        Object values[] = new Object[7];
+        Object values[] = new Object[9];
         values[0] = super.saveState(context);
         values[1] = _layoutWidth;
         values[2] = _enabledOnUserRole;
@@ -153,6 +154,8 @@
         values[4] = _displayValueOnly;
         values[5] = _displayValueOnlyStyle;
         values[6] = _displayValueOnlyStyleClass;
+        values[7] = _forceId;
+        values[8] = _escape;
         return ((Object) (values));
     }
 
@@ -166,6 +169,8 @@
         _displayValueOnly = (Boolean)values[4];
         _displayValueOnlyStyle = (String)values[5];
         _displayValueOnlyStyleClass = (String)values[6];
+        _forceId = (Boolean) values[7];
+        _escape = (Boolean) values[8];
     }
     //------------------ GENERATED CODE END ---------------------------------------
 

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlMessageTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlMessageTag.java?rev=348252&r1=348251&r2=348252&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlMessageTag.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlMessageTag.java Tue Nov 22 13:13:17 2005
@@ -18,12 +18,8 @@
 import org.apache.myfaces.component.UserRoleAware;
 import org.apache.myfaces.component.html.ext.HtmlMessage;
 import org.apache.myfaces.taglib.html.HtmlMessageTagBase;
-import org.apache.myfaces.renderkit.JSFAttr;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
 
 import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
 
 /**
  * @author Manfred Geiler (latest modification by $Author$)
@@ -32,7 +28,7 @@
 public class HtmlMessageTag
         extends HtmlMessageTagBase
 {
-    private static final Log log = LogFactory.getLog(HtmlMessageTag.class);
+    //private static final Log log = LogFactory.getLog(HtmlOutputFormatTag.class);
 
     public String getComponentType()
     {
@@ -50,8 +46,7 @@
     private String _visibleOnUserRole;
     private String _replaceIdWithLabel;
 
-    public void release()
-    {
+    public void release() {
         super.release();
 
         _summaryFormat = null;
@@ -60,33 +55,15 @@
         _visibleOnUserRole = null;
         _replaceIdWithLabel = null;
     }
-
     protected void setProperties(UIComponent component)
     {
-        // setting message properties
         super.setProperties(component);
 
         setStringProperty(component, "summaryFormat", _summaryFormat);
         setStringProperty(component, "detailFormat", _detailFormat);
         setStringProperty(component, UserRoleAware.ENABLED_ON_USER_ROLE_ATTR, _enabledOnUserRole);
         setStringProperty(component, UserRoleAware.VISIBLE_ON_USER_ROLE_ATTR, _visibleOnUserRole);
-        setBooleanProperty(component, "replaceIdWithLabel", _replaceIdWithLabel == null ? Boolean.TRUE.toString() : _replaceIdWithLabel);
-
-    }
-
-    protected String getOrCreateUniqueId(FacesContext context)
-    {
-        String id = getId();
-        if (id == null)
-        {
-            // default id so client side scripts can use this (ie: ajax), this will obviously break things if someone specifies an id, so please don't specify an id if using Ajax components!
-            id = "msgFor_" + getFor();
-            log.debug("Setting id on MessageTag: " + id);
-            setForceId("true");
-        }
-        //String id = super.getOrCreateUniqueId(context);
-        //log.debug("ID after getorcreate: " + id);
-        return id;
+        setBooleanProperty(component, "replaceIdWithLabel",_replaceIdWithLabel==null?Boolean.TRUE.toString():_replaceIdWithLabel);
     }
 
     public void setSummaryFormat(String summaryFormat)