You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2005/12/14 22:18:50 UTC
svn commit: r356873 -
/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTag.java
Author: lofwyr
Date: Wed Dec 14 13:18:43 2005
New Revision: 356873
URL: http://svn.apache.org/viewcvs?rev=356873&view=rev
Log:
use tx:selectOneChoice when you need tc:selectOneChoice with a label
Modified:
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTag.java
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTag.java?rev=356873&r1=356872&r2=356873&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTag.java Wed Dec 14 13:18:43 2005
@@ -21,21 +21,33 @@
import static org.apache.myfaces.tobago.TobagoConstants.FACET_LAYOUT;
import org.apache.myfaces.tobago.component.ComponentUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.faces.component.UIComponent;
import javax.servlet.jsp.JspException;
public class SelectOneChoiceTag extends SelectOneTag implements SelectOneChoiceTagDeclaration {
- public int doEndTag() throws JspException {
+ private static final Log LOG = LogFactory.getLog(InTag.class);
- UIComponent component = getComponentInstance();
- // TODO remove this
- if (component.getFacet(FACET_LAYOUT) == null) {
- UIComponent layout = ComponentUtil.createLabeledInputLayoutComponent();
- component.getFacets().put(FACET_LAYOUT, layout);
+// public int doEndTag() throws JspException {
+
+// UIComponent component = getComponentInstance();
+ // TODO remove this: use tx:
+// if (component.getFacet(FACET_LAYOUT) == null) {
+// UIComponent layout = ComponentUtil.createLabeledInputLayoutComponent();
+// component.getFacets().put(FACET_LAYOUT, layout);
+// }
+// return super.doEndTag();
+// }
+
+ protected void setProperties(UIComponent component) {
+ if (label != null) {
+ LOG.warn("the label attribute is deprecated in tc:selectOneChoice, " +
+ "please use tx:selectOneChoice instead.");
}
- return super.doEndTag();
+ super.setProperties(component);
}
public void setRequired(String required) {