<%@ 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="tooltipSubviewID">
	<h:messages></h:messages>

	<h:outputText value="DEFAULT VALUE:"></h:outputText>

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

	<h:inputText value="Text" id="inp1" size="50">
		<rich:toolTip id="toolTipID" value="toolTip for input text" onclick="showEvent('onclickInputID', 'onclick work!')"

			oncomplete="showEvent('oncompleteInputID', 'oncomplete work!')" ondblclick="showEvent('ondblclickInputID', 'ondblclick work!')"
			onhide="showEvent('onhideInputID', 'onhide work!')" onkeydown="showEvent('onkeydownInputID', 'onkeydown work!')"
			onkeypress="showEvent('onkeypressInputID', 'onkeypress work!')" onkeyup="showEvent('onkeyupInputID', 'onkeyup work!')"
			onmousedown="showEvent('onmousedownInputID', 'onmousedown work!')"
			onmousemove="showEvent('onmousemoveInputID', 'onmousemove work!')"
			onmouseout="showEvent('onmouseoutInputID', 'onmouseout work!')"
			onmouseover="showEvent('onmouseoverInputID', 'onmouseover work!')" onmouseup="showEvent('onmouseupInputID', 'onmouseup work!')"
			onshow="showEvent('onshowInputID', 'onshow work!')">
				<f:facet name="defaultContent">
					<f:verbatim>DEFAULT VALUE</f:verbatim>
				</f:facet>
			</rich:toolTip>
	</h:inputText>
	<h:panelGrid columns="2">
		<h:outputText value="JavaScript API"></h:outputText>
		<h:column></h:column>
		<a4j:commandLink onclick="$('formID:tooltipSubviewID:toolTipID').component.doShow(event)" value="doShow"></a4j:commandLink>
		<a4j:commandLink onclick="$('formID:tooltipSubviewID:toolTipID').component.doHide(event)" value="doHide"></a4j:commandLink>
		<a4j:commandLink onclick="$('formID:tooltipSubviewID:toolTipID').component.doEnable" value="doEnable"></a4j:commandLink>
		<a4j:commandLink onclick="$('formID:tooltipSubviewID:toolTipID').component.doDisable" value="doDisable"></a4j:commandLink>
	</h:panelGrid>
	<h:selectOneListbox value="1" id="ddl">
		<rich:toolTip value="1231231" onclick="showEvent('onclickInputID', 'onclick work!')"
			oncomplete="showEvent('oncompleteInputID', 'oncomplete work!')" ondblclick="showEvent('ondblclickInputID', 'ondblclick work!')"
			onhide="showEvent('onhideInputID', 'onhide work!')" onkeydown="showEvent('onkeydownInputID', 'onkeydown work!')"
			onkeypress="showEvent('onkeypressInputID', 'onkeypress work!')" onkeyup="showEvent('onkeyupInputID', 'onkeyup work!')"
			onmousedown="showEvent('onmousedownInputID', 'onmousedown work!')"
			onmousemove="showEvent('onmousemoveInputID', 'onmousemove work!')"
			onmouseout="showEvent('onmouseoutInputID', 'onmouseout work!')"
			onmouseover="showEvent('onmouseoverInputID', 'onmouseover work!')" onmouseup="showEvent('onmouseupInputID', 'onmouseup work!')"
			onshow="showEvent('onshowInputID', 'onshow work!')">
			<f:facet name="defaultContent">
				<f:verbatim>DEFAULT VALUE DropDown</f:verbatim>
			</f:facet>
		</rich:toolTip>
	</h:selectOneListbox>

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

	<h:outputText value=" Test tooltip:"></h:outputText>
	<f:verbatim>
		<br />
	</f:verbatim>

	<rich:panel style="width:50px; height:50px; background-color: gray">
		<rich:toolTip id="tooltipID" value="#{tooltip.value}" mode="#{tooltip.mode}" event="#{tooltip.event}"
			hideDelay="#{tooltip.hideDelay}" showDelay="#{tooltip.showDelay}" layout="#{tooltip.layout}"
			horizontalOffset="#{tooltip.horizontalOffset}" verticalOffset="#{tooltip.verticalOffset}" followMouse="#{tooltip.followMouse}"
			direction="#{tooltip.direction}" style="#{tooltip.style}" disabled="#{tooltip.disabled}" rendered="#{tooltip.rendered}"
			onclick="showEvent('onclickInputID', 'onclick work!')" oncomplete="showEvent('oncompleteInputID', 'oncomplete work!')"
			ondblclick="showEvent('ondblclickInputID', 'ondblclick work!')" onhide="showEvent('onhideInputID', 'onhide work!')"
			onkeydown="showEvent('onkeydownInputID', 'onkeydown work!')" onkeypress="showEvent('onkeypressInputID', 'onkeypress work!')"
			onkeyup="showEvent('onkeyupInputID', 'onkeyup work!')" onmousedown="showEvent('onmousedownInputID', 'onmousedown work!')"
			onmousemove="showEvent('onmousemoveInputID', 'onmousemove work!')"
			onmouseout="showEvent('onmouseoutInputID', 'onmouseout work!')"
			onmouseover="showEvent('onmouseoverInputID', 'onmouseover work!')" onmouseup="showEvent('onmouseupInputID', 'onmouseup work!')"
			onshow="showEvent('onshowInputID', 'onshow work!')">
			<h:graphicImage id="pricsID" value="/pics/ajax_process.gif"></h:graphicImage>
		</rich:toolTip>
	</rich:panel>

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

</f:subview>
