<%@ 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://labs.jboss.com/jbossrichfaces/ui/inplaceSelect" prefix="is"%>
<html>
      <head>
		<title>InplaceSelect Sample</title>
		<style>
			.tab_example {width : 300px; border-top:1px solid #c0c0c0; border-left:1px solid #c0c0c0;}
			.tab_example td{width : 150px;  border-bottom:1px solid #c0c0c0; border-right:1px solid #c0c0c0;}
		</style>
	  </head>
	  <body>
	  	<f:view>
	  		<h:form>
				<h:selectOneRadio binding="#{skinBean.component}" />
				<h:commandLink action="#{skinBean.change}" value="set skin" />
				<h:outputText value="Current skin: #{skinBean.skin}"/><br />
			</h:form>
	  		<h:form>
	  			<h:panelGrid columns="2">
	  				<h:outputText value="editEvent is: "></h:outputText>
	  				<h:inputText value="#{bean.editEvent}"></h:inputText>
	  				
	  				<h:outputText value="maxSelectWidth is: "></h:outputText>
	  				<h:inputText value="#{bean.maxSelectWidth}"></h:inputText>
	  				
	  				<h:outputText value="minSelectWidth is: "></h:outputText>
	  				<h:inputText value="#{bean.minSelectWidth}"></h:inputText>
	  				
	  				<h:outputText value="selectWidth is: "></h:outputText>
	  				<h:inputText value="#{bean.selectWidth}"></h:inputText>
	  				
	  				<h:outputText value="defaultLabel is: "></h:outputText>
	  				<h:inputText value="#{bean.defaultLabel}"></h:inputText>
	  				
	  				<h:outputText value="controlsVerticalPosition is: "></h:outputText>
	  				<h:inputText value="#{bean.controlsPosition}"></h:inputText>
	  				
	  				<h:outputText value="controlsHorizontalPosition is: "></h:outputText>
	  				<h:inputText value="#{bean.controlsHorizontalAlign}"></h:inputText>
	  				
	  				<h:outputText value="value is: "></h:outputText>
	  				<h:inputText value="#{bean.value}"></h:inputText>
	  				
	  				<h:outputText value="listWidth is: "></h:outputText>
	  				<h:inputText value="#{bean.listWidth}"></h:inputText>
	  				
	  				<h:outputText value="listHeight is: "></h:outputText>
	  				<h:inputText value="#{bean.listHeight}"></h:inputText>
	  				
	  				<h:outputText value="selectOnEdit (default: false): " />
					<h:selectBooleanCheckbox value="#{bean.selectOnEdit}" />
	  				
	  				<h:outputText value="showControls (default: false): " />
					<h:selectBooleanCheckbox value="#{bean.showControls}" />
					
	  				<h:outputText value="editOnTab (default: true): " />
					<h:selectBooleanCheckbox value="#{bean.editOnTab}" />
					
					<h:outputText value="openOnEdit (default: false): " />
					<h:selectBooleanCheckbox value="#{bean.openOnEdit}" />
	  			  			  			
	  			</h:panelGrid>
	  			  		
	  			
	  			Fresh off his victory in the Florida primary, Sen. John McCain is poised to take another big prize. Former
	  			    <is:inplaceSelect 
						id="inplace"
	  			    	editEvent="#{bean.editEvent}"
	  			    	maxSelectWidth="#{bean.maxSelectWidth}"
	  			    	minSelectWidth="#{bean.minSelectWidth}"
	  			    	defaultLabel="#{bean.defaultLabel}"
	  			    	controlsVerticalPosition="#{bean.controlsPosition}"
	  			    	controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
	  			    	value="#{bean.value}"
	  			    	listWidth="#{bean.listWidth}"
	  			    	listHeight="#{bean.listHeight}"
	  			    	selectOnEdit="#{bean.selectOnEdit}"
	  			    	showControls="#{bean.showControls}"
	  			    	editOnTab="#{bean.editOnTab}"
	  			    	openOnEdit="#{bean.openOnEdit}"
						valueChangeListener="#{bean.valueChange}"
						layout="inline"
						>
						<f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
						<f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
						<f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
						<f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
						<f:selectItem itemValue="option 5" itemLabel="Detroit"/>
						<f:selectItem itemValue="option 6" itemLabel="Toronto"/>
						<f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
						<f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
						<f:selectItem itemValue="option 9" itemLabel="New York"/>
					</is:inplaceSelect>
					<a4j:commandButton reRender="inplace" value="12312"></a4j:commandButton> 
					
				 Mayor Rudy Giuliani plans to drop out and endorse McCain, two GOP sources said. That would give McCain added momentum heading into a debate Wednesday and next week's Super Tuesday contests
				
				<br/>
				<h:outputText value="value is: #{bean.value}"></h:outputText>			
				<h:commandButton value="submit"></h:commandButton>
				
					
				<table class="tab_example" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td> 	  			    
							<is:inplaceSelect 
			  			    	editEvent="#{bean.editEvent}"
			  			    	maxSelectWidth="#{bean.maxSelectWidth}"
			  			    	minSelectWidth="#{bean.minSelectWidth}"
			  			    	defaultLabel="#{bean.defaultLabel}"
			  			    	controlsVerticalPosition="#{bean.controlsPosition}"
			  			    	controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
			  			    	value="#{bean.value}"
			  			    	listWidth="#{bean.listWidth}"
			  			    	listHeight="#{bean.listHeight}"
			  			    	selectOnEdit="#{bean.selectOnEdit}"
			  			    	showControls="#{bean.showControls}"
			  			    	editOnTab="#{bean.editOnTab}"
			  			    	openOnEdit="#{bean.openOnEdit}"
								valueChangeListener="#{bean.valueChange}"
								layout="block"
								>
								<f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
								<f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
								<f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
								<f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
								<f:selectItem itemValue="option 5" itemLabel="Detroit"/>
								<f:selectItem itemValue="option 6" itemLabel="Toronto"/>
								<f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
								<f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
								<f:selectItem itemValue="option 9" itemLabel="New York"/>
							</is:inplaceSelect>
						</td>
						<td> 	  			    
							<is:inplaceSelect 
			  			    	editEvent="#{bean.editEvent}"
			  			    	maxSelectWidth="#{bean.maxSelectWidth}"
			  			    	minSelectWidth="#{bean.minSelectWidth}"
			  			    	defaultLabel="#{bean.defaultLabel}"
			  			    	controlsVerticalPosition="#{bean.controlsPosition}"
			  			    	controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
			  			    	value="#{bean.value}"
			  			    	listWidth="#{bean.listWidth}"
			  			    	listHeight="#{bean.listHeight}"
			  			    	selectOnEdit="#{bean.selectOnEdit}"
			  			    	showControls="#{bean.showControls}"
			  			    	editOnTab="#{bean.editOnTab}"
			  			    	openOnEdit="#{bean.openOnEdit}"
								valueChangeListener="#{bean.valueChange}"
								layout="block"
								>
								<f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
								<f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
								<f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
								<f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
								<f:selectItem itemValue="option 5" itemLabel="Detroit"/>
								<f:selectItem itemValue="option 6" itemLabel="Toronto"/>
								<f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
								<f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
								<f:selectItem itemValue="option 9" itemLabel="New York"/>
							</is:inplaceSelect>
						</td>
					</tr>
					<tr>
						<td> 	  			    
							<is:inplaceSelect 
			  			    	editEvent="#{bean.editEvent}"
			  			    	maxSelectWidth="#{bean.maxSelectWidth}"
			  			    	minSelectWidth="#{bean.minSelectWidth}"
			  			    	defaultLabel="#{bean.defaultLabel}"
			  			    	controlsVerticalPosition="#{bean.controlsPosition}"
			  			    	controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
			  			    	value="#{bean.value}"
			  			    	listWidth="#{bean.listWidth}"
			  			    	listHeight="#{bean.listHeight}"
			  			    	selectOnEdit="#{bean.selectOnEdit}"
			  			    	showControls="#{bean.showControls}"
			  			    	editOnTab="#{bean.editOnTab}"
			  			    	openOnEdit="#{bean.openOnEdit}"
								valueChangeListener="#{bean.valueChange}"
								layout="block"
								>
								<f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
								<f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
								<f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
								<f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
								<f:selectItem itemValue="option 5" itemLabel="Detroit"/>
								<f:selectItem itemValue="option 6" itemLabel="Toronto"/>
								<f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
								<f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
								<f:selectItem itemValue="option 9" itemLabel="New York"/>
							</is:inplaceSelect>
						</td>
						<td> 	  			    
							<is:inplaceSelect 
			  			    	editEvent="#{bean.editEvent}"
			  			    	maxSelectWidth="#{bean.maxSelectWidth}"
			  			    	minSelectWidth="#{bean.minSelectWidth}"
			  			    	defaultLabel="#{bean.defaultLabel}"
			  			    	controlsVerticalPosition="#{bean.controlsPosition}"
			  			    	controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
			  			    	value="#{bean.value}"
			  			    	listWidth="#{bean.listWidth}"
			  			    	listHeight="#{bean.listHeight}"
			  			    	selectOnEdit="#{bean.selectOnEdit}"
			  			    	showControls="#{bean.showControls}"
			  			    	editOnTab="#{bean.editOnTab}"
			  			    	openOnEdit="#{bean.openOnEdit}"
								valueChangeListener="#{bean.valueChange}"
								layout="block"
								>
								<f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
								<f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
								<f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
								<f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
								<f:selectItem itemValue="option 5" itemLabel="Detroit"/>
								<f:selectItem itemValue="option 6" itemLabel="Toronto"/>
								<f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
								<f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
								<f:selectItem itemValue="option 9" itemLabel="New York"/>
							</is:inplaceSelect>
						</td>
					</tr>
					<tr>
						<td> 	  			    
							<is:inplaceSelect 
			  			    	editEvent="#{bean.editEvent}"
			  			    	maxSelectWidth="#{bean.maxSelectWidth}"
			  			    	minSelectWidth="#{bean.minSelectWidth}"
			  			    	defaultLabel="#{bean.defaultLabel}"
			  			    	controlsVerticalPosition="#{bean.controlsPosition}"
			  			    	controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
			  			    	value="#{bean.value}"
			  			    	listWidth="#{bean.listWidth}"
			  			    	listHeight="#{bean.listHeight}"
			  			    	selectOnEdit="#{bean.selectOnEdit}"
			  			    	showControls="#{bean.showControls}"
			  			    	editOnTab="#{bean.editOnTab}"
			  			    	openOnEdit="#{bean.openOnEdit}"
								valueChangeListener="#{bean.valueChange}"
								layout="block"
								>
								<f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
								<f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
								<f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
								<f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
								<f:selectItem itemValue="option 5" itemLabel="Detroit"/>
								<f:selectItem itemValue="option 6" itemLabel="Toronto"/>
								<f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
								<f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
								<f:selectItem itemValue="option 9" itemLabel="New York"/>
							</is:inplaceSelect>
						</td>
						<td> 	  			    
							<is:inplaceSelect 
			  			    	editEvent="#{bean.editEvent}"
			  			    	maxSelectWidth="#{bean.maxSelectWidth}"
			  			    	minSelectWidth="#{bean.minSelectWidth}"
			  			    	defaultLabel="#{bean.defaultLabel}"
			  			    	controlsVerticalPosition="#{bean.controlsPosition}"
			  			    	controlsHorizontalPosition="#{bean.controlsHorizontalAlign}"
			  			    	value="#{bean.value}"
			  			    	listWidth="#{bean.listWidth}"
			  			    	listHeight="#{bean.listHeight}"
			  			    	selectOnEdit="#{bean.selectOnEdit}"
			  			    	showControls="#{bean.showControls}"
			  			    	editOnTab="#{bean.editOnTab}"
			  			    	openOnEdit="#{bean.openOnEdit}"
								valueChangeListener="#{bean.valueChange}"
								layout="block"
								>
								<f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
								<f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
								<f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
								<f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
								<f:selectItem itemValue="option 5" itemLabel="Detroit"/>
								<f:selectItem itemValue="option 6" itemLabel="Toronto"/>
								<f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
								<f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
								<f:selectItem itemValue="option 9" itemLabel="New York"/>
							</is:inplaceSelect>
						</td>
					</tr>
				</table>
			</h:form>
		</f:view>
	  </body>	
</html>  
