Author: vmolotkov
Date: 2007-12-10 15:31:27 -0500 (Mon, 10 Dec 2007)
New Revision: 4675
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/OrderingListRendererBase.java
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
headers rendering was changed
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-10
20:18:21 UTC (rev 4674)
+++
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingComponentRendererBase.java 2007-12-10
20:31:27 UTC (rev 4675)
@@ -384,6 +384,18 @@
writer.endElement(HTML.DIV_ELEM);
}
+ protected boolean isHeaderExists(FacesContext context, UIOrderingBaseComponent
component, String facetName) {
+ Iterator headers = component.columns();
+ while (headers.hasNext()) {
+ UIComponent column = (UIComponent) headers.next();
+ UIComponent facet = column.getFacet(facetName);
+ if (facet != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
protected void encodeHeaderFacets(FacesContext context, ResponseWriter writer,
Iterator headers, String skinCellClass,
String headerClass, String facetName, String element, UIOrderingBaseComponent
orderingList
Modified:
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java
===================================================================
---
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-12-10
20:18:21 UTC (rev 4674)
+++
branches/3.1.x/ui/orderingList/src/main/java/org/richfaces/renderkit/OrderingListRendererBase.java 2007-12-10
20:31:27 UTC (rev 4675)
@@ -58,6 +58,10 @@
super.encodeBegin(context, component);
}
+ public boolean isHeaderExists(FacesContext context, UIOrderingBaseComponent component)
{
+ return isHeaderExists(context, component, "header");
+ }
+
public void encodeControlsFacets(FacesContext context, UIOrderingList orderingList)
throws IOException {
String clientId = orderingList.getClientId(context);
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-10
20:18:21 UTC (rev 4674)
+++
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-10
20:31:27 UTC (rev 4675)
@@ -49,6 +49,7 @@
contentContainerStyle =
contentContainerStyle.concat("width:").concat(HtmlUtil.qualifySize(listWidthValue)).concat(";");
variables.setVariable("contentContainerStyle",
contentContainerStyle);
}
+ if (isHeaderExists(context, component)) {
]]></jsp:scriptlet>
<div class="rich-ordering-list-header"
style="#{contentContainerStyle}">
<table id="#{clientId}internal_header_tab"
class="rich-ordering-list-items" cellpadding="0"
cellspacing="0">
@@ -56,6 +57,7 @@
</table>
</div>
<jsp:scriptlet><![CDATA[
+ }
String listHeightValue = (String)
component.getAttributes().get("listHeight");
if (listHeightValue != null) {
contentContainerStyle =
contentContainerStyle.concat("height:").concat(HtmlUtil.qualifySize(listHeightValue)).concat(";");
Show replies by date