<%@ 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/rich" prefix="rich"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<f:view>
<f:subview id="modalPanel">
	<h:form id="MPform">

		<rich:modalPanel id="MPid"
		 minHeight="#{modalPanel.minHeight}" minWidth="#{modalPanel.minWidth}"
		 height="#{modalPanel.height}" width="#{modalPanel.width}"
		 moveable="#{modalPanel.moveable}" resizeable="#{modalPanel.resizeable}">

			<f:facet name="header">
				<h:outputText value="Heder goes here..." />
			</f:facet>
			<h:outputText value="This is Modal Panel example" styleClass="text1" />
		
			<f:verbatim>
				<br/>
				<br/>
			</f:verbatim>
		
			<h:outputLink
				onclick="Richfaces.hideModalPanel('MPform:MPid');return false;"
				value="Close">
				<f:verbatim>Close</f:verbatim>
			</h:outputLink>

		</rich:modalPanel>

		<a onclick="Richfaces.showModalPanel('MPform:MPid');" href="#">Show MP</a> 
  	
		<rich:spacer height="20px"></rich:spacer>
		
		<h:panelGrid columns="2" >
		
		<h:outputText value="Width:" />
		<h:inputText value="#{modalPanel.width}">
			<a4j:support event="onchange" reRender="MPform:MPid"></a4j:support>		
		</h:inputText>	
		
		<h:outputText value="Height:" />
		<h:inputText value="#{modalPanel.height}">
			<a4j:support event="onchange" reRender="MPform:MPid"></a4j:support>		
		</h:inputText>	
				
		<h:outputText value="minWidth:" />
		<h:inputText value="#{modalPanel.minWidth}">
			<a4j:support event="onchange" reRender="MPform:MPid"></a4j:support>		
		</h:inputText>	
				
		<h:outputText value="minHeight:" />
		<h:inputText value="#{modalPanel.minHeight}">
			<a4j:support event="onchange" reRender="MPform:MPid"></a4j:support>		
		</h:inputText>			
		
		<h:outputText value="Resizeable:" />
		<h:selectBooleanCheckbox value="#{modalPanel.resizeable}" >
			<a4j:support event="onclick" reRender="MPform:MPid"></a4j:support>
		</h:selectBooleanCheckbox>		
				
		<h:outputText value="Moveable:" />
		<h:selectBooleanCheckbox value="#{modalPanel.moveable}" >
			<a4j:support event="onclick" reRender="MPform:MPid"></a4j:support>
		</h:selectBooleanCheckbox>			
				
		</h:panelGrid>
		
		<h:commandLink value="Back" action="main"></h:commandLink>
	</h:form>
</f:subview>

