<?xml version="1.0" encoding="UTF-8"?>
<f:root xmlns:f="http://ajax4jsf.org/cdk/template"
	xmlns:c=" http://java.sun.com/jsf/core"
	xmlns:ui=" http://ajax4jsf.org/cdk/ui"
	xmlns:u=" http://ajax4jsf.org/cdk/u"
	xmlns:x=" http://ajax4jsf.org/cdk/x"
	baseclass="org.richfaces.renderkit.html.DropDownMenuRendererBase"
	class="org.richfaces.renderkit.html.DropDownMenuRenderer"
	component="org.richfaces.component.UIDropDownMenu">
	<h:styles>css/dropdownmenu.xcss</h:styles>

	<f:clientid var="clientId" />
	<jsp:scriptlet>
		<![CDATA[ org.richfaces.component.UIDropDownMenu menu = (org.richfaces.component.UIDropDownMenu) component;
		        if (!menu.getSubmitMode().equalsIgnoreCase("none"))
		        	org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);
		        
    			if (!menu.isDisabled()) {]]>
    </jsp:scriptlet>
					<div id="#{clientId}" style="#{component.attributes['style']}"
						class="#{component.attributes['styleClass']} dr-menu-label dr-menu-label-unselect rich-ddmenu-label rich-ddmenu-label-unselect"
						onmouseover="#{component.attributes['onmouseover']}"
						onmouseout="#{component.attributes['onmouseout']}"
						onmousemove="#{component.attributes['onmousemove']}">
	<jsp:scriptlet>	
		<![CDATA[ } else { ]]> 
	</jsp:scriptlet>
					<div id="#{clientId}" style="#{component.attributes['style']}"
						class="dr-menu-label dr-menu-label-unselect dr-ddmenu-label-disabled rich-ddmenu-label-disabled rich-ddmenu-label-unselect #{component.attributes['styleClass']}"
						onmouseover="#{component.attributes['onmouseover']}"
						onmouseout="#{component.attributes['onmouseout']}"
						onmousemove="#{component.attributes['onmousemove']}">
	<jsp:scriptlet>
		<![CDATA[ } 
    			
    					if (menu.isDisabled() && (component.getFacet("labelDisabled")!=null && component.getFacet("labelDisabled").isRendered())) {]]>
	</jsp:scriptlet> 
						<span class="dr-label-text-decor rich-label-text-decor"> 
							<u:insertFacet name="labelDisabled" /> 
						</span> 
	<jsp:scriptlet>			
			<![CDATA[} else if(component.getFacet("label")!=null && component.getFacet("label").isRendered()) {]]>
	</jsp:scriptlet> 
						<span class="dr-label-text-decor rich-label-text-decor"> 
							<u:insertFacet name="label" /> 
						</span> 
	<jsp:scriptlet>	
			<![CDATA[} else {]]> 
	</jsp:scriptlet> 
						<span class="dr-label-text-decor rich-label-text-decor">#{component.attributes['value']}</span>
	<jsp:scriptlet>	
			<![CDATA[}]]> 
	</jsp:scriptlet>

						<div style="margin: 0px; padding: 0px; border: 0px; position: relative; z-index: 100;">
							<vcp:body>
								<f:call name="renderChildren" />
							</vcp:body>
						</div>

	<jsp:scriptlet>
		<![CDATA[if (!((org.richfaces.component.UIDropDownMenu) component).isDisabled()) {]]>
    </jsp:scriptlet>
			</div>
	<jsp:scriptlet>	
		<![CDATA[} else {]]> 
	</jsp:scriptlet>
			</div>
	<jsp:scriptlet>	
		<![CDATA[}]]>  
	</jsp:scriptlet>
</f:root>