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

	<h:form>
	<rich:toolBar id="toolBarId" width="#{toolBar.width}"
			height="#{toolBar.height}" rendered="#{toolBar.rendered}"
			itemSeparator="#{toolBar.itemSeparator}" contentClass="#{toolBar.contentStyle}" separatorClass="#{toolBar.separatorStyle}" >
			<h:outputText value="ToolBar" style="font-style: italic"></h:outputText>

			<rich:toolBarGroup >
				<h:outputText value="Width:"></h:outputText>
				<h:inputText value="#{toolBar.width}">
					<a4j:support event="onchange" reRender="toolBarId"></a4j:support>
				</h:inputText>
			</rich:toolBarGroup>

			<rich:toolBarGroup>
				<h:outputText value="Height:"></h:outputText>
				<h:inputText value="#{toolBar.height}">
					<a4j:support event="onchange" reRender="toolBarId"></a4j:support>
				</h:inputText>
			</rich:toolBarGroup>

			<rich:toolBarGroup location="#{toolBar.location}">
				<h:graphicImage value="/pics/ajax_process.gif"></h:graphicImage>
			</rich:toolBarGroup>

		</rich:toolBar>

		<h:panelGrid columns="2">
			<h:outputText value="Image location:"></h:outputText>
			<h:selectOneRadio value="#{toolBar.location}">
				<f:selectItem itemLabel="left" itemValue="left" />
				<f:selectItem itemLabel="right" itemValue="right" />
				<a4j:support event="onclick" reRender="toolBarId"></a4j:support>
			</h:selectOneRadio>


			<h:outputText value="itemSeparator:"></h:outputText>
			<h:selectOneRadio value="#{toolBar.itemSeparator}">
				<f:selectItem itemLabel="none" itemValue="none" />
				<f:selectItem itemLabel="line" itemValue="line" />
				<f:selectItem itemLabel="square" itemValue="square" />
				<f:selectItem itemLabel="disc" itemValue="disc" />
				<f:selectItem itemLabel="grid" itemValue="grid" />
				<a4j:support event="onclick" reRender="toolBarId"></a4j:support>
			</h:selectOneRadio>
			
			<h:outputText value="Switch Styles" />
			<a4j:commandButton id="slBtn" value="#{toolBar.btnLabel}" 
			action="#{toolBar.doStyles}" reRender="toolBarId,slBtn">
			</a4j:commandButton>
		</h:panelGrid>
		<h:commandLink value="Back" action="main"></h:commandLink>
	</h:form>

</f:subview>

