Author: sergeyhalipov
Date: 2007-12-05 13:56:15 -0500 (Wed, 05 Dec 2007)
New Revision: 4513
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
Ordering list: caption fixed.
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-12-05
18:14:33 UTC (rev 4512)
+++
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-12-05
18:56:15 UTC (rev 4513)
@@ -450,4 +450,15 @@
return string;
}
}
+
+ public String getCaptionDisplay(FacesContext context, UIComponent component) {
+ Object caption =
component.getAttributes().get(OrderingComponentControlsHelper.ATTRIBUTE_CAPTION_LABEL);
+ UIComponent facet = component.getFacet(OrderingComponentControlsHelper.FACET_CAPTION);
+
+ if ((null != caption && !"".equals(caption)) ||
+ (null != facet && facet.isRendered())) {
+ return "";
+ }
+ return "display: none;";
+ }
}
Modified:
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-05
18:14:33 UTC (rev 4512)
+++
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-05
18:56:15 UTC (rev 4513)
@@ -34,7 +34,7 @@
<table id="#{clientId}table" cellpadding="0"
cellspacing="0" class="rich-ordering-list-body">
<tbody>
- <tr>
+ <tr style="#{this:getCaptionDisplay(context, component)}" >
<td align="left" colspan="2"
class="rich-ordering-list-caption">
<f:call name="encodeCaption"/>
</td>
Show replies by date