<%@ 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="orderingListSubviewID">

	<a4j:outputPanel ajaxRendered="true">
		<h:messages />
	</a4j:outputPanel>

	<rich:orderingList id="orderingListID" value="#{orderingList.list}" var="item" listHeight="#{orderingList.listHeight}"
		listWidth="#{orderingList.listWidth}" controlsType="#{orderingList.controlsType}" converter="orderingListConverter"
		bottomControlLabel="#{orderingList.bottomControlLabel}" captionLabel="#{orderingList.captionLabel}"
		topControlLabel="#{orderingList.topControlLabel}" upControlLabel="#{orderingList.upControlLabel}"
		controlsHorizontalAlign="#{orderingList.controlsHorizontalAlign}" controlsVerticalAlign="#{orderingList.controlsVerticalAlign}"
		 downControlLabel="#{orderingList.downControlLabel}"
		orderControlsVisible="#{orderingList.orderControlsVisible}" fastOrderControlsVisible="#{orderingList.fastOrderControlsVisible}"
		rendered="#{orderingList.rendered}" showButtonLabels="#{orderingList.showButtonLabels}" selection="#{orderingList.selection}"
		onmousemove="print('onmousemoveInputID', 'onmousemove work!')" onclick="print('onclickInputID', 'onclick work!')" 
		ondblclick="print('ondblclickInputID', 'ondblclick work!')" onmouseout="print('onmouseoutInputID', 'onmouseout work!')" 
		onmouseover="print('onmouseoverInputID', 'onmouseover work!')" onorderchanged="print('onorderchangedInputID', 'onorderchanged work!')" ontopclick="print('ontopclickInputID', 'ontopclick work!')" onupclick="print('onupclickInputID', 'onupclick work!')" ondownclick="print('ondownclickInputID', 'ondownclick work!')" onbottomclick="print('onbottomclickInputID', 'onbottomclick work!')" onheaderclick="print('onheaderclickInputID', 'onheaderclick work!')">
		<f:facet name="header">
			<h:outputText value="header" />
		</f:facet>
		<f:facet name="footer">
			<h:outputText value="footer" />
		</f:facet>

		<h:column>
			<f:facet name="header">
				<h:outputText value="Number" />
			</f:facet>
			<h:outputText value="#{item.int0}" />
		</h:column>

		<h:column>
			<f:facet name="header">
				<h:outputText value="Input" />
			</f:facet>
			<h:inputText value="#{item.str0}" />
		</h:column>

		<h:column>
			<f:facet name="header">
				<h:outputText value="Button" />
			</f:facet>
			<h:commandButton onclick="submit();" action="#{orderingList.cbAction}" value="#{item.str0} submit();" />
		</h:column>

		<h:column>
			<f:facet name="header">
				<h:outputText value="Input" />
			</f:facet>
			<h:inputText value="#{item.str1}" />
		</h:column>

		<h:column>
			<f:facet name="header">
				<h:outputText value="Link" />
			</f:facet>
			<a4j:commandLink action="#{orderingList.clAction}" value="#{item.str1} submit()" reRender="orderingListID"></a4j:commandLink>
		</h:column>

		<h:column>
			<f:facet name="header">
				<h:outputText value="select" />
			</f:facet>
			<h:selectOneMenu value="#{item.str2}" reRender="orderingListID">
				<f:selectItem itemLabel="select0" itemValue="select0" />
				<f:selectItem itemLabel="select1" itemValue="select1" />
				<f:selectItem itemLabel="select2" itemValue="select2" />
				<f:selectItem itemLabel="select3" itemValue="select3" />
				<f:selectItem itemLabel="select4" itemValue="select4" />
				<a4j:support event="onclick" action="submit();"></a4j:support>
			</h:selectOneMenu>
		</h:column>

		<h:column>
			<f:facet name="header">
				<h:outputText value="Text" />
			</f:facet>
			<h:outputText value="#{item.str3}" />
		</h:column>

		<h:column>
			<f:facet name="header">
				<h:outputText value="graphicImage" />
			</f:facet>
			<h:graphicImage value="#{item.str3}" />
		</h:column>
	</rich:orderingList>
</f:subview>