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/11 17:27:52 UTC
svn commit: r555303 - in /myfaces/tobago/trunk:
example/demo/src/main/webapp/reference/
theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
theme/scarborough/src/main/resources/org/apache/myfaces/tobago/re...
Author: lofwyr
Date: Wed Jul 11 08:27:51 2007
New Revision: 555303
URL: http://svn.apache.org/viewvc?view=rev&rev=555303
Log:
TOBAGO-442: selectManyCheckbox and selectOneRadio with Attribute inline="true" calculates wrong fixedHight
Modified:
myfaces/tobago/trunk/example/demo/src/main/webapp/reference/select.jsp
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
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties
myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties
Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/reference/select.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/reference/select.jsp?view=diff&rev=555303&r1=555302&r2=555303
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/reference/select.jsp (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/reference/select.jsp Wed Jul 11 08:27:51 2007
@@ -24,23 +24,11 @@
<tc:box>
<f:facet name="layout">
<tc:gridLayout
- rows="fixed;fixed;fixed;fixed;fixed;fixed;fixed;fixed;fixed;45px;45px;fixed;fixed;fixed;200px;200px;fixed;*"/>
+ rows="fixed;fixed;fixed;fixed;fixed;fixed;fixed;45px;45px;fixed;fixed;fixed;200px;200px;fixed;fixed;fixed;fixed;fixed;*;fixed"/>
</f:facet>
<tc:messages/>
- <tc:selectOneRadio>
- <tc:selectItem itemValue="sun" itemLabel="Sun" />
- <tc:selectItem itemValue="moon" itemLabel="Moon" />
- <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
- </tc:selectOneRadio>
-
- <tc:selectManyCheckbox>
- <tc:selectItem itemValue="sun" itemLabel="Sun" />
- <tc:selectItem itemValue="moon" itemLabel="Moon" />
- <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
- </tc:selectManyCheckbox>
-
<%-- code-sniplet-start id="selectBooleanCheckbox" --%>
<tc:selectBooleanCheckbox label="_Letter"/>
<%-- code-sniplet-end id="selectBooleanCheckbox" --%>
@@ -125,9 +113,45 @@
</tx:selectOneListbox>
<%-- code-sniplet-end id="selectOneListbox" --%>
- <tc:button label="submit" action="submit"/>
+ <tc:separator >
+ <f:facet name="label">
+ <tc:label value="Layout"/>
+ </f:facet>
+ </tc:separator>
+
+ <tc:selectOneRadio>
+ <tc:selectItem itemValue="sun" itemLabel="Sun" />
+ <tc:selectItem itemValue="moon" itemLabel="Moon" />
+ <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
+ </tc:selectOneRadio>
+
+ <tc:selectOneRadio inline="true">
+ <tc:selectItem itemValue="sun" itemLabel="Sun" />
+ <tc:selectItem itemValue="moon" itemLabel="Moon" />
+ <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
+ </tc:selectOneRadio>
+
+ <tc:selectManyCheckbox>
+ <tc:selectItem itemValue="sun" itemLabel="Sun" />
+ <tc:selectItem itemValue="moon" itemLabel="Moon" />
+ <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
+ </tc:selectManyCheckbox>
+
+ <tc:selectManyCheckbox inline="true">
+ <tc:selectItem itemValue="sun" itemLabel="Sun" />
+ <tc:selectItem itemValue="moon" itemLabel="Moon" />
+ <tc:selectItem itemValue="stars" itemLabel="Stars" itemDisabled="true" />
+ </tc:selectManyCheckbox>
<tc:cell/>
+
+ <tc:panel>
+ <f:facet name="layout">
+ <tc:gridLayout columns="*;fixed" />
+ </f:facet>
+ <tc:cell/>
+ <tc:button action="submit" label="Submit" />
+ </tc:panel>
</tc:box>
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=555303&r1=555302&r2=555303
==============================================================================
--- 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 Wed Jul 11 08:27:51 2007
@@ -145,10 +145,12 @@
}
public int getFixedHeight(FacesContext facesContext, UIComponent component) {
- List<SelectItem> items
- = ComponentUtil.getItemsToRender((UISelectMany) component);
- return items.size() * super.getFixedHeight(facesContext, component);
+ int heightPerRow = super.getFixedHeight(facesContext, component);
+ if (ComponentUtil.getBooleanAttribute(component, ATTR_INLINE)) {
+ return heightPerRow;
+ } else {
+ List<SelectItem> items = ComponentUtil.getItemsToRender((UISelectMany) component);
+ return items.size() * heightPerRow;
+ }
}
-
}
-
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=555303&r1=555302&r2=555303
==============================================================================
--- 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 Wed Jul 11 08:27:51 2007
@@ -168,10 +168,13 @@
}
public int getFixedHeight(FacesContext facesContext, UIComponent component) {
- List<SelectItem> items
- = ComponentUtil.getItemsToRender((UISelectOne) component);
- return items.size() * super.getFixedHeight(facesContext, component);
+ int heightPerRow = super.getFixedHeight(facesContext, component);
+ if (ComponentUtil.getBooleanAttribute(component, ATTR_INLINE)) {
+ return heightPerRow;
+ } else {
+ List<SelectItem> items = ComponentUtil.getItemsToRender((UISelectOne) component);
+ return items.size() * heightPerRow;
+ }
}
}
-
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties?view=diff&rev=555303&r1=555302&r2=555303
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties Wed Jul 11 08:27:51 2007
@@ -54,7 +54,7 @@
SelectBooleanCheckbox.componentExtraWidth=21
-SelectManyCheckbox.fixedHeight=19
+SelectManyCheckbox.fixedHeight=20
Label.fixedWidth=144
@@ -83,6 +83,7 @@
Sheet.ascendingMarkerWidth=10
Sheet.headerHeight=20
Sheet.footerHeight=20
+#Sheet.rowHeight=18
Sheet.rowPadding=5
Sheet.selectorMenuWidth=20
Sheet.cellPaddingWidth=4
@@ -103,7 +104,7 @@
TreeListboxBox.fixedHeight=80
-SelectOneRadio.fixedHeight=18
+SelectOneRadio.fixedHeight=20
RichTextEditor.headerHeight=28
Modified: myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties?view=diff&rev=555303&r1=555302&r2=555303
==============================================================================
--- myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties Wed Jul 11 08:27:51 2007
@@ -46,6 +46,7 @@
Sheet.ascendingMarkerWidth=15
Sheet.headerHeight=20
Sheet.footerHeight=15
+#Sheet.rowHeight=19
Sheet.rowPadding=3
Sheet.contentBorder=2
Sheet.selectorMenuWidth=16