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

svn commit: r357744 - /incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java

Author: bommel
Date: Mon Dec 19 10:32:14 2005
New Revision: 357744

URL: http://svn.apache.org/viewcvs?rev=357744&view=rev
Log:
added TimeExtensionTag

Modified:
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java?rev=357744&r1=357743&r2=357744&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java Mon Dec 19 10:32:14 2005
@@ -22,6 +22,8 @@
 import static org.apache.myfaces.tobago.TobagoConstants.FACET_LAYOUT;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UIInput;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.faces.application.Application;
 import javax.faces.component.UIComponent;
@@ -31,8 +33,9 @@
 import javax.servlet.jsp.JspException;
 import java.util.TimeZone;
 
-public class TimeTag extends InputTag
-    implements TimeTagDeclaration {
+public class TimeTag extends InputTag implements TimeTagDeclaration {
+
+  private static final Log LOG = LogFactory.getLog(TimeTag.class);
 
   public String getComponentType() {
     return UIInput.COMPONENT_TYPE;
@@ -46,7 +49,7 @@
       UIComponent layout = ComponentUtil.createLabeledInputLayoutComponent();
       component.getFacets().put(FACET_LAYOUT, layout);
     } */
-    // TODO
+    // TODO  move to renderkit
     if (component.getConverter() == null) {
       Application application
           = FacesContext.getCurrentInstance().getApplication();
@@ -60,5 +63,12 @@
     return super.doEndTag();
   }
 
+  protected void setProperties(UIComponent component) {
+    if (label != null) {
+      LOG.warn("the label attribute is deprecated in tc:time, " +
+          "please use tx:time instead.");
+    }
+    super.setProperties(component);
+  }
 }