<%@ 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="insertID">
	<h:form>
		<h:messages />
		
		<rich:panel id="panelID" header="Highlight: #{insert.highlight}; File: #{insert.src}">
			<rich:insert id="insertID" highlight="#{insert.highlight}"
				rendered="#{insert.rendered}" src="#{insert.src}"></rich:insert>
		</rich:panel>

		<h:panelGrid columns="2">
			<h:outputText value="Highlight:" />
			<h:selectOneMenu value="#{insert.highlight}">
				<f:selectItem itemValue="HTML" itemLabel="HTML" />
				<f:selectItem itemValue="GROOVY" itemLabel="GROOVY" />
				<f:selectItem itemValue="JAVA" itemLabel="JAVA" />
				<f:selectItem itemValue="BEANSHELL" itemLabel="BEANSHELL" />
				<f:selectItem itemValue="BSH" itemLabel="BSH" />
				<f:selectItem itemValue="XML" itemLabel="XML" />
				<f:selectItem itemValue="XHTML" itemLabel="XHTML" />
				<f:selectItem itemValue="LZX" itemLabel="LZX" />
				<f:selectItem itemValue="CPP" itemLabel="CPP" />
				<f:selectItem itemValue="CXX" itemLabel="CXX" />
				<a4j:support event="onclick" reRender="panelID,insertID"></a4j:support>
			</h:selectOneMenu>
			
			<h:outputText value="Select file:" />
			<h:selectOneMenu value="#{insert.src}">
				<f:selectItem itemValue="/Insert/src/test.html" itemLabel="HTML" />
				<f:selectItem itemValue="/Insert/src/test.java" itemLabel="JAVA" />
				<f:selectItem itemValue="/Insert/src/test.groovy" itemLabel="GROOVY" />
				<f:selectItem itemValue="/Insert/src/test.bsh" itemLabel="BEANSHELL,BSH" />
				<f:selectItem itemValue="/Insert/src/test.xml" itemLabel="XML" />
				<f:selectItem itemValue="/Insert/Insert.jsp" itemLabel="XHTML" />
				<f:selectItem itemValue="/Insert/src/test.lzx" itemLabel="LZX" />
				<f:selectItem itemValue="/Insert/src/test.cpp" itemLabel="CPP,CXX" />
				<a4j:support event="onclick" action="submit();" reRender="panelID,insertID"></a4j:support>
			</h:selectOneMenu>
			
			<h:outputText value="Rendered" />
			<h:selectBooleanCheckbox value="#{insert.rendered}" onchange="submit();"/>
		</h:panelGrid>
		<h:commandLink value="Back" action="main"></h:commandLink>
	</h:form>
	</f:subview>

