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

		<h:outputText value="Panel 1, rendered: #{!panel.rendered}; Panel 2, rendered #{panel.rendered};"></h:outputText>

		<rich:panel rendered="#{!panel.rendered}" id="p1" style="width:#{panel.width};height:#{panel.height};overflow:auto;"
		ondblclick="print('ondblclickInputID', 'ondblclick work!')" onkeydown="print('onkeydownInputID', 'onkeydown work!')" onclick="print('onclickInputID', 'onclick work!')" onkeypress="print('onkeypressInputID', 'onkeypress work!')" onkeyup="print('onkeyupInputID', 'onkeyup work!')" onmousedown="print('onmousedownInputID', 'onmousedown work!')" onmousemove="print('onmousemoveInputID', 'onmousemove work!')" onmouseout="print('onmouseoutInputID', 'onmouseout work!')" onmouseover="print('onmouseoverInputID', 'onmouseover work!')" onmouseup="print('onmouseupInputID', 'onmouseup work!')">
			<f:facet name="header">
				<h:outputText id="t1" value="#{panel.title[0]} (Panel 1)" />
			</f:facet>

			<rich:panel>
				<f:facet name="header">
					<h:outputText id="t2" value="#{panel.title[1]}" />
				</f:facet>
				<h:panelGrid columns="2">
					<h:outputText id="o1" value="width #{panel.title[2]}, eg. 250px"></h:outputText>
					<h:inputText value="#{w}">
						<a4j:support event="onchange" reRender="p3"></a4j:support>
					</h:inputText>

					<h:outputText id="o2" value="height #{panel.title[2]}, eg. 200px"></h:outputText>
					<h:inputText value="#{h}">
						<a4j:support event="onchange" reRender="p3"></a4j:support>
					</h:inputText>
				</h:panelGrid>

				<rich:panel id="p3" style="width:#{w};height:#{h};overflow:auto;">
					<f:facet name="header">
						<h:outputText id="t3" value="#{panel.title[2]}" />
					</f:facet>
					<h:graphicImage value="/pics/asus.jpg" width="150" height="100"></h:graphicImage>
				</rich:panel>
			</rich:panel>
		</rich:panel>

		<rich:panel id="panelId" rendered="#{panel.rendered}"
			style="width:#{panel.width};height:#{panel.height}"
			ondblclick="print('ondblclickInputID', 'ondblclick work!')" onkeydown="print('onkeydownInputID', 'onkeydown work!')" onclick="print('onclickInputID', 'onclick work!')" onkeypress="print('onkeypressInputID', 'onkeypress work!')" onkeyup="print('onkeyupInputID', 'onkeyup work!')" onmousedown="print('onmousedownInputID', 'onmousedown work!')" onmousemove="print('onmousemoveInputID', 'onmousemove work!')" onmouseout="print('onmouseoutInputID', 'onmouseout work!')" onmouseover="print('onmouseoverInputID', 'onmouseover work!')" onmouseup="print('onmouseupInputID', 'onmouseup work!')">
			<f:verbatim>This is panel 2 example...(Test events)</f:verbatim>

		</rich:panel>
</f:subview>

