<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<f:subview id="DataTableSubviewID">
		<rich:dataTable id="dataTableID" var="dataTableID" value="#{dataTable.mounths}" rowKeyVar="key" styleClass="table"
			captionClass="caption" rowClasses="rowa,rowb,rowc rowcc" headerClass="header" footerClass="footer" onRowClick="print('onRowClickInputID', 'onRowClick work!');alert('row #{key}');" rendered="#{dataTable.rendered}" align="#{dataTable.align}" bgcolor="red"
			border="#{dataTable.border}" columnsWidth="#{dataTable.columnsWidth}" width="#{dataTable.width}" title="DataTableTite"
			onRowDblClick="print('onRowDblClickInputID', 'onRowDblClick work!')"
			onRowMouseDown="print('onRowMouseDownInputID', 'onRowMouseDown work!')"
			onRowMouseMove="print('onRowMouseMoveInputID', 'onRowMouseMove work!')"
			onRowMouseOut="print('onRowMouseOutInputID', 'onRowMouseOut work!')"
			onRowMouseOver="print('onRowMouseOverInputID', 'onRowMouseOver work!')"
			onRowMouseUp="print('onRowMouseUpInputID', 'onRowMouseUp work!')">
			<f:facet name="caption">
				<h:outputText value="caption facet" />
			</f:facet>
			<f:facet name="header">
				<rich:columnGroup columnClasses="cola, colb ,rowc rowcc">
					<rich:column rowspan="2" rendered="#{dataTable.r2rendered}">
						<h:outputText value="2-row head" />
					</rich:column>
					<h:column rendered="#{dataTable.r2rendered}">
						<h:outputText value="head in UIColumn" />
					</h:column>
					<rich:column breakBefore="true">
						<h:outputText value="2-d row head" />
					</rich:column>
				</rich:columnGroup>
			</f:facet>
			<f:facet name="footer">
				<h:outputText value="table foot" />
			</f:facet>
			<rich:columnGroup>
				<rich:column id="mounth" styleClass="column" rowspan="2" headerClass="cheader" footerClass="cfooter">
					<f:facet name="header">
						<h:outputText value="mounth" />
					</f:facet>
					<f:facet name="footer">
						<h:outputText value="-//-" />
					</f:facet>
					<h:outputText value="#{dataTableID.mounth}" />
				</rich:column>
				<rich:column styleClass="column" headerClass="cheader" footerClass="cfooter" rendered="#{dataTable.r2rendered}">
					<f:facet name="header">
						<h:outputText value="mounth" />
					</f:facet>
					<f:facet name="footer">
						<h:outputText value="-//-" />
					</f:facet>
					<h:outputText value="#{dataTableID.town}" />
				</rich:column>
			</rich:columnGroup>
			<rich:column styleClass="column" headerClass="cheader" footerClass="cfooter" rendered="#{dataTable.r2rendered}">
				<h:outputText value="#{dataTableID.day}" />
			</rich:column>
			<rich:subTable id="detail" var="detail" value="#{dataTableID.detail}">
			<f:facet name="header">
				<h:outputText value="facet(header)" />
			</f:facet>
			<f:facet name="footer">
				<h:outputText value="facet(footer)" />
			</f:facet>
				<rich:column id="name">
					<h:outputText value="#{detail.name}" />
				</rich:column>
				<rich:column id="qty" rendered="#{dataTable.r2rendered}">
					<h:outputText value="#{detail.qty}" />
				</rich:column>
			</rich:subTable>
			<rich:column id="total" styleClass="total" colspan="2">
				<h:outputText value="#{dataTableID.total}" />
			</rich:column>
		</rich:dataTable>
</f:subview>
