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 2007/01/15 17:30:15 UTC
svn commit: r496390 - in
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib:
decl/ extension/
Author: bommel
Date: Mon Jan 15 08:30:14 2007
New Revision: 496390
URL: http://svn.apache.org/viewvc?view=rev&rev=496390
Log:
(TOBAGO-241) tx:in and tx:date should support setting the layout width of the label
Added:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasLabelWidth.java
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectBooleanCheckboxExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java
Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasLabelWidth.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasLabelWidth.java?view=auto&rev=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasLabelWidth.java (added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasLabelWidth.java Mon Jan 15 08:30:14 2007
@@ -0,0 +1,37 @@
+package org.apache.myfaces.tobago.taglib.decl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+
+/*
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: Jan 15, 2007
+ * Time: 4:49:14 PM
+ */
+public interface HasLabelWidth {
+ /**
+ * The width for the label component.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setLabelWidth(String width);
+
+}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -34,6 +34,7 @@
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -51,7 +52,7 @@
public class DateExtensionTag extends BodyTagSupport
implements HasValue, HasValueChangeListener, HasValidator, HasIdBindingAndRendered,
HasConverter, IsReadonly, IsDisabled, HasOnchange,
- IsRequired, HasTip, HasLabel, IsFocus, IsInline {
+ IsRequired, HasTip, HasLabel, HasLabelWidth, IsFocus, IsInline {
private String binding;
private String converter;
@@ -67,6 +68,7 @@
private String valueChangeListener;
private String inline;
private String onchange;
+ private String labelWidth;
private LabelExtensionTag labelTag;
@@ -80,7 +82,11 @@
if (label != null) {
labelTag.setValue(label);
}
- labelTag.setColumns("fixed;*;15px");
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*;15px");
+ } else {
+ labelTag.setColumns("fixed;*;15px");
+ }
if (tip != null) {
labelTag.setTip(tip);
}
@@ -161,6 +167,7 @@
converter = null;
validator = null;
disabled = null;
+ labelWidth = null;
focus = null;
label = null;
inline = null;
@@ -228,5 +235,9 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -24,6 +24,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasLabel;
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -35,7 +36,7 @@
@Tag(name = "file")
public class FileExtensionTag extends BodyTagSupport
implements InputTagDeclaration, HasIdBindingAndRendered, IsDisabled,
- HasTip, HasLabel {
+ HasTip, HasLabel, HasLabelWidth {
private String binding;
private String label;
@@ -46,6 +47,7 @@
private String rendered;
private String tip;
private String onchange;
+ private String labelWidth;
private LabelExtensionTag labelTag;
private FileTag fileTag;
@@ -64,6 +66,9 @@
if (rendered != null) {
labelTag.setRendered(rendered);
}
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*");
+ }
labelTag.setParent(getParent());
labelTag.doStartTag();
@@ -109,9 +114,12 @@
binding = null;
validator = null;
disabled = null;
+ label = null;
+ labelWidth = null;
tip = null;
onchange = null;
value = null;
+ rendered = null;
valueChangeListener = null;
}
@@ -149,5 +157,8 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -35,6 +35,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import org.apache.myfaces.tobago.taglib.decl.HasSuggestMethod;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -60,7 +61,7 @@
public class InExtensionTag extends BodyTagSupport
implements HasValue, HasValueChangeListener, HasValidator, HasIdBindingAndRendered,
HasConverter, IsReadonly, IsDisabled, HasOnchange,
- IsRequired, HasTip, HasLabel, IsPassword, IsFocus, HasSuggestMethod {
+ IsRequired, HasTip, HasLabel, HasLabelWidth, IsPassword, IsFocus, HasSuggestMethod {
private String binding;
private String converter;
@@ -78,6 +79,7 @@
private String onchange;
private String suggestMethod;
private String markup;
+ private String labelWidth;
private LabelExtensionTag labelTag;
private InTag inTag;
@@ -96,6 +98,9 @@
if (rendered != null) {
labelTag.setRendered(rendered);
}
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*");
+ }
labelTag.setParent(getParent());
labelTag.doStartTag();
@@ -164,6 +169,7 @@
converter = null;
validator = null;
disabled = null;
+ labelWidth = null;
focus = null;
label = null;
password = null;
@@ -245,5 +251,9 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectBooleanCheckboxExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectBooleanCheckboxExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectBooleanCheckboxExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectBooleanCheckboxExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -27,6 +27,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.HasValidator;
import org.apache.myfaces.tobago.taglib.decl.IsReadonly;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import org.apache.myfaces.tobago.taglib.component.SelectBooleanCheckboxTag;
import org.apache.myfaces.tobago.taglib.component.TobagoTagDeclaration;
@@ -45,7 +46,7 @@
@Tag(name = "selectBooleanCheckbox")
public class SelectBooleanCheckboxExtensionTag extends BodyTagSupport implements TobagoTagDeclaration,
HasValidator, HasOnchange, HasValueChangeListener, HasIdBindingAndRendered, HasLabel,
- HasBooleanValue, IsDisabled, HasTip, IsReadonly {
+ HasBooleanValue, HasLabelWidth, IsDisabled, HasTip, IsReadonly {
private String value;
private String valueChangeListener;
@@ -58,6 +59,7 @@
private String tip;
private String converter;
private String validator;
+ private String labelWidth;
private LabelExtensionTag labelTag;
private SelectBooleanCheckboxTag selectBooleanCheckboxTag;
@@ -76,6 +78,9 @@
if (rendered != null) {
labelTag.setRendered(rendered);
}
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*");
+ }
/* TODO accessKey
if (labelWithAccessKey != null) {
label.setLabelWithAccessKey(labelWithAccessKey);
@@ -141,6 +146,7 @@
onchange = null;
disabled = null;
label = null;
+ labelWidth = null;
readonly = null;
rendered = null;
converter = null;
@@ -193,6 +199,10 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -33,6 +33,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import org.apache.myfaces.tobago.taglib.decl.IsReadonly;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -51,7 +52,7 @@
@Tag(name = "selectManyListbox")
public class SelectManyListboxExtensionTag extends BodyTagSupport
implements HasId, HasValue, HasValueChangeListener, IsDisabled, HasDeprecatedHeight, IsInline,
- HasLabel, IsRendered, HasBinding, HasTip, HasConverter, HasValidator, HasOnchange, IsReadonly {
+ HasLabel, HasLabelWidth,IsRendered, HasBinding, HasTip, HasConverter, HasValidator, HasOnchange, IsReadonly {
private String required;
private String value;
@@ -67,6 +68,7 @@
private String height;
private String converter;
private String validator;
+ private String labelWidth;
private LabelExtensionTag labelTag;
private SelectManyListboxTag selectManyListboxTag;
@@ -85,6 +87,9 @@
if (rendered != null) {
labelTag.setRendered(rendered);
}
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*");
+ }
/* TODO accessKey
if (labelWithAccessKey != null) {
label.setLabelWithAccessKey(labelWithAccessKey);
@@ -154,6 +159,7 @@
disabled = null;
inline = null;
label = null;
+ labelWidth = null;
height = null;
readonly = null;
rendered = null;
@@ -219,5 +225,9 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -33,6 +33,7 @@
import org.apache.myfaces.tobago.taglib.decl.IsRendered;
import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -45,7 +46,7 @@
public class SelectOneChoiceExtensionTag
extends BodyTagSupport
implements HasId, HasValue, HasValueChangeListener, IsDisabled,
- IsReadonly, HasOnchange, IsInline, HasLabel, IsRequired,
+ IsReadonly, HasOnchange, IsInline, HasLabel, HasLabelWidth, IsRequired,
IsRendered, HasBinding, HasTip , HasValidator, HasConverter {
private String required;
@@ -61,6 +62,7 @@
private String tip;
private String validator;
private String converter;
+ private String labelWidth;
private LabelExtensionTag labelTag;
private SelectOneChoiceTag selectOneChoiceTag;
@@ -79,6 +81,9 @@
if (rendered != null) {
labelTag.setRendered(rendered);
}
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*");
+ }
labelTag.setParent(getParent());
labelTag.doStartTag();
@@ -139,6 +144,7 @@
disabled = null;
inline = null;
label = null;
+ labelWidth = null;
converter = null;
validator = null;
readonly = null;
@@ -199,6 +205,10 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -33,6 +33,7 @@
import org.apache.myfaces.tobago.taglib.decl.IsRendered;
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -49,7 +50,7 @@
@Tag(name = "selectOneListbox")
public class SelectOneListboxExtensionTag
extends BodyTagSupport implements HasId, HasValue, HasValueChangeListener, IsDisabled,
- HasLabel, IsReadonly, HasOnchange, IsRendered,
+ HasLabel, HasLabelWidth,IsReadonly, HasOnchange, IsRendered,
HasBinding, HasDeprecatedHeight, HasTip , IsRequired, HasConverter, HasValidator {
private String required;
private String value;
@@ -65,6 +66,7 @@
private String height;
private String converter;
private String validator;
+ private String labelWidth;
private LabelExtensionTag labelTag;
private SelectOneListboxTag selectOneListboxTag;
@@ -83,6 +85,9 @@
if (rendered != null) {
labelTag.setRendered(rendered);
}
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*");
+ }
labelTag.setParent(getParent());
labelTag.doStartTag();
@@ -144,6 +149,7 @@
onchange = null;
disabled = null;
inline = null;
+ labelWidth = null;
label = null;
height = null;
readonly = null;
@@ -211,5 +217,9 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -31,6 +31,7 @@
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -43,7 +44,7 @@
public class TextAreaExtensionTag extends BodyTagSupport
implements HasValue, HasValueChangeListener, HasIdBindingAndRendered,
HasConverter, HasValidator, IsReadonly, IsDisabled,
- IsRequired, HasTip, HasLabel, IsFocus, HasOnchange {
+ IsRequired, HasTip, HasLabel, HasLabelWidth, IsFocus, HasOnchange {
private String binding;
private String converter;
@@ -58,6 +59,7 @@
private String valueChangeListener;
private String validator;
private String onchange;
+ private String labelWidth;
private LabelExtensionTag labelTag;
private TextAreaTag textAreaTag;
@@ -76,6 +78,9 @@
if (rendered != null) {
labelTag.setRendered(rendered);
}
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*");
+ }
labelTag.setParent(getParent());
labelTag.doStartTag();
@@ -134,6 +139,7 @@
converter = null;
validator = null;
disabled = null;
+ labelWidth = null;
focus = null;
label = null;
readonly = null;
@@ -196,5 +202,8 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java?view=diff&rev=496390&r1=496389&r2=496390
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java Mon Jan 15 08:30:14 2007
@@ -32,6 +32,7 @@
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -49,7 +50,7 @@
public class TimeExtensionTag extends BodyTagSupport
implements HasValue, HasValueChangeListener, HasValidator, HasIdBindingAndRendered,
HasConverter, IsReadonly, IsDisabled, HasOnchange,
- IsRequired, HasTip, HasLabel, IsFocus, IsInline {
+ IsRequired, HasTip, HasLabel, HasLabelWidth, IsFocus, IsInline {
private String binding;
private String converter;
@@ -65,6 +66,7 @@
private String valueChangeListener;
private String inline;
private String onchange;
+ private String labelWidth;
private LabelExtensionTag labelTag;
private TimeTag timeTag;
@@ -83,6 +85,9 @@
if (rendered != null) {
labelTag.setRendered(rendered);
}
+ if (labelWidth != null) {
+ labelTag.setColumns(labelWidth + ";*");
+ }
labelTag.setParent(getParent());
labelTag.doStartTag();
@@ -144,6 +149,7 @@
converter = null;
validator = null;
disabled = null;
+ labelWidth = null;
focus = null;
label = null;
inline = null;
@@ -210,5 +216,8 @@
public void setTip(String tip) {
this.tip = tip;
+ }
+ public void setLabelWidth(String labelWidth) {
+ this.labelWidth = labelWidth;
}
}