<?xml version="1.0" encoding="utf-8" ?>
<jsp:root version="1.2" 
  xmlns:jsp="http://java.sun.com/JSP/Page"
   xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:ice="http://www.icesoft.com/icefaces/component">
<jsp:directive.page contentType="text/html;charset=utf-8" />
<f:view>
  <ice:outputDeclaration doctypeRoot="HTML" doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN" doctypeSystem="http://www.w3.org/TR/html4/loose.dtd"/>
  <html>
    <head>
     <title>Van Helsing</title>
     <ice:outputStyle href="./xmlhttp/css/rime/rime.css" />
     <ice:outputStyle href="./css/tree.css" />
     
    </head>
    <body>
    <ice:outputText style="color:grey; font-size:32px" value="Van Helsing"/>
    <ice:form>
    
	<ice:panelTabSet>
	        <ice:panelTab  label="Configuration">
	        
	        	<ice:panelDivider style="height:600px;width:95%" dividerPosition="30">
	        	<f:facet name="first">
		    	<ice:tree id="baum"	
		    			value="#{configurationBean.dataTree.tree}" 
		    			var="item"
		    			hideRootNode = "false"
		    			hideNavigation ="false"
		    			imageDir = "css/images/">
		    				
		    		<ice:treeNode id="knoten">
		    			<f:facet name="icon">
		    					<ice:panelGroup style="display: inline" >
			                    <ice:graphicImage
			                         value="/css/images/#{item.userObject.icon}"/>
              					</ice:panelGroup>
		    			</f:facet>
		    			<f:facet name="content">
		    			<!--<ice:panelGroup  styleClass="selectedNode#{item.userObject.userObject.resId eq configurationBean.selectedId} selectedComponent#{item.userObject.selected}"
							style="display:inline" > --> 

						<ice:commandLink actionListener="#{configurationBean.renderResource}">
		    				<f:param name="userObject.resId" value="#{item.userObject.userObject.resId}"/>
		    				<f:param name="userObject.resName" value="#{item.userObject.userObject.resName}" />
		    				<ice:outputText id="knoten" value="#{item.userObject.userObject.resName}"/>
						</ice:commandLink>
		    			<!--</ice:panelGroup> -->
		    			</f:facet>
		    		</ice:treeNode>
		    	</ice:tree>
		    	</f:facet>
		    	<f:facet name="second">
		    			<f:subview id="selectedResource" >
							<jsp:directive.include file="/selectedResource.jspx" />
						</f:subview>
		    	</f:facet>
		    	</ice:panelDivider>

			    <ice:panelGroup style="float:top">
			    	<ice:commandButton id="newClient"
			    		value="create client"
			    		actionListener="#{configurationBean.newClientButtonListener}" />
			    		
					<ice:commandButton id="reloadRes"
						value="reload Tree"
						actionListener="#{configurationBean.reloadResourceButtonListener}" />
					
					<ice:commandButton id="saveRes"
				    	value="update resource"
				        actionListener="#{configurationBean.saveButtonListener}"/>
					
					<ice:commandButton id="deleteRes"
						value="delete resource"
						actionListener="#{configurationBean.deleteResourceButtonListener}" />
			 	</ice:panelGroup> 
		    	
	        </ice:panelTab>
	 
	        <ice:panelTab label="Job / Schedule">
	        	<ice:commandButton id="createNode"
	        		value="create"
	        		actionListener="#{jobScheduleBean.createNodeListener}" />

	        	<ice:commandButton id="updateNode"
	        		value="update"
	        		actionListener="#{jobScheduleBean.updateNodeListener}" />

	        	<ice:commandButton id="deleteNode" 
	        		value="delete" actionListener="#{jobScheduleBean.deleteNodeListener}">
	   				<f:param name="userObject.resId" value="#{item.userObject.userObject.resId}"/>
	   				<f:param name="userObject.resName" value="#{item.userObject.userObject.resName}" />
				</ice:commandButton>	        		
	        	<ice:commandButton id="reloadTree"
	        		value="reloadTree"
	        		actionListener="#{jobScheduleBean.reloadTreeListener}" />
	        	
	        	<ice:panelDivider style="height:600px;width:85%" dividerPosition="30">
					<f:facet name="first">
			    	<ice:tree id="baum2"	
		    			value="#{jobScheduleBean.dataTree.tree}" 
		    			var="item"
		    			hideRootNode = "false"
		    			hideNavigation ="false"
		    			imageDir = "css/images/">
							<ice:treeNode id="knoten">
								<f:facet name="icon">
			    					<ice:panelGroup style="display: inline" >
				                    <ice:graphicImage
				                         value="/css/images/#{item.userObject.icon}"/>
	              					</ice:panelGroup>
								</f:facet>
								<f:facet name="content">
									<ice:commandLink actionListener="#{jobScheduleBean.selectNode}">
					    				<f:param name="userObject.resId" value="#{item.userObject.userObject.resId}"/>
					    				<f:param name="userObject.resName" value="#{item.userObject.userObject.resName}" />
					    			    <ice:outputText id="knoten" value="#{item.userObject.userObject.resName}" />
									</ice:commandLink>
								</f:facet>
							</ice:treeNode>
						</ice:tree>
					</f:facet>
					<f:facet name="second">
					</f:facet>
			</ice:panelDivider>	        	
	        </ice:panelTab>
	 
	        <ice:panelTab label="Topology">
	        </ice:panelTab>

			<ice:panelTab label="Dependencies">
			</ice:panelTab>
	</ice:panelTabSet>
	
    </ice:form>
    <ice:form>
		<ice:messages />
	</ice:form>
    </body>
  </html>
</f:view>
</jsp:root>