<%@ 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="componentControlSubviewID">
		<rich:modalPanel id="ccModalPanelID" onshow="alert(event.parameters.show)" onhide="alert(event.parameters.hide)">
			<h:outputLink id="hideButton1ID" onclick="return false;" value="#">
				<f:verbatim>Close 1</f:verbatim>
			</h:outputLink>
			<f:verbatim>
				<br />
			</f:verbatim>
			<h:outputLink id="hideButton2ID" onclick="return false;" value="#">
				<f:verbatim>Close 2</f:verbatim>
			</h:outputLink>
		</rich:modalPanel>
		
		<h:commandButton id="showButtonID" value="show ModalPanel" >
			<rich:componentControl for="ccModalPanelID" event="onclick" disableDefault="true" operation="show" params="show:'componentControl work(show)'" />
		</h:commandButton>

		<rich:componentControl attachTo="hideButton1ID, hideButton2ID" event="onclick" for="ccModalPanelID" operation="hide"
			params="hide:'componentControl work(hide)'" />

		<f:verbatim>
			<br />
			<br />
		</f:verbatim>

		<rich:calendar popup="#{componentControl.calendarPopup}" id="ccCalendarID" mode="ajax" />
		<h:panelGrid columns="2">
			<h:outputText value="popup calendar" />
			<h:selectBooleanCheckbox id="calendarSelectID" value="#{componentControl.calendarPopup}" onchange="submit();" />
		</h:panelGrid>
<a onclick="$('j_id_jsp_362828066_1:componentControlSubviewID:ccCalendarID').component.Expand()" href="#">Show</a>


		<f:verbatim>
			<br />
			<br />
		</f:verbatim>

		<rich:panelMenu id="ccContextMenuPanelMenuID">
			<h:outputText value="click text" />
		</rich:panelMenu>

		<rich:contextMenu id="ccContextMenuID" submitMode="ajax"  onexpand="alert(event.parameters.expand)">
			<rich:menuItem icon="/pics/header.png" value="tab1">
			</rich:menuItem>
			<rich:menuSeparator />
			<rich:menuItem icon="/pics/info.gif" value="a">
			</rich:menuItem>
			<rich:menuItem icon="/pics/info.gif" value="b">
			</rich:menuItem>
			<rich:menuItem icon="/pics/info.gif" value="c">
			</rich:menuItem>
		</rich:contextMenu>
		<rich:componentControl event="oncontextmenu" attachTo="ccContextMenuPanelMenuID" for="ccContextMenuID" 
			operation="show" params="expand:'show work'" />
			
		<jsp:include page="CalendarJSAPI.jsp" />
</f:subview>