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 2007/07/09 17:42:51 UTC

svn commit: r554687 - in /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag: SelectManyCheckboxRenderer.java SelectOneRadioRenderer.java

Author: lofwyr
Date: Mon Jul  9 08:42:50 2007
New Revision: 554687

URL: http://svn.apache.org/viewvc?view=rev&rev=554687
Log:
TOBAGO-438: Label of tc:selectOneRadio and tc:tc:selectManyCheckbox is to far away from the input control.
For the first, this is a hotfix. In later versions a layout-manager should be used.

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java?view=diff&rev=554687&r1=554686&r2=554687
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java Mon Jul  9 08:42:50 2007
@@ -41,8 +41,8 @@
 import javax.faces.model.SelectItem;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Arrays;
+import java.util.List;
 
 public class SelectManyCheckboxRenderer extends SelectManyRendererBase {
 
@@ -111,6 +111,7 @@
         if (!inline) {
           writer.endElement(HtmlConstants.TD);
           writer.startElement(HtmlConstants.TD, null);
+          writer.writeStyleAttribute("width: 100%;"); // todo: make more nice with a layout-manager!
         }
         // FIXME: use created UIOutput Label
         // FIXME: see outcommented part

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java?view=diff&rev=554687&r1=554686&r2=554687
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java Mon Jul  9 08:42:50 2007
@@ -113,11 +113,9 @@
       writer.writeNameAttribute(clientId);
 
       writer.writeIdAttribute(id);
-      String formattedValue
-          = RenderUtil.getFormattedValue(facesContext, component, item.getValue());
+      String formattedValue = RenderUtil.getFormattedValue(facesContext, component, item.getValue());
       writer.writeAttribute(HtmlAttributes.VALUE, formattedValue, true);
-      writer.writeAttribute(HtmlAttributes.DISABLED,
-          ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED));
+      writer.writeAttribute(HtmlAttributes.DISABLED, ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED));
       writer.writeAttributeFromComponent(HtmlAttributes.TITLE, ATTR_TIP);
       if (!ComponentUtil.getBooleanAttribute(component, ATTR_REQUIRED)) {
         writer.writeAttribute(HtmlAttributes.ONCLICK, "Tobago.selectOneRadioClick(this, '" + clientId + "')", false);
@@ -130,6 +128,7 @@
         if (!inline) {
           writer.endElement(HtmlConstants.TD);
           writer.startElement(HtmlConstants.TD, null);
+          writer.writeStyleAttribute("width: 100%;"); // todo: make more nice with a layout-manager!
         }
 
         // FIXME: use created UIOutput Label