<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">
	<rich:modalPanel id="shelfModalPanel" width="200" height="300" autosized="true" onshow="$('form5:name').focus();">
		<f:facet name="header">Add shelf</f:facet>
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="/img/modal/close.png" style="cursor:pointer"
					id="hidelink19" />
				<rich:componentControl for="shelfModalPanel" attachTo="hidelink19"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		<a4j:form id="form5">
			<a4j:region renderRegionOnly="true">
				<rich:graphValidator> 
				<h:panelGrid columns="3" id="editContent" rowClasses="prop"
					columnClasses="name,value, error">
					<h:outputText value="Name:" />
					<h:inputText id="name" value="#{shelf.name}">
					</h:inputText>
					<rich:message for="name" />
					<h:outputText value="#{messages['album.shared']}" />
					<h:selectBooleanCheckbox styleClass="selectBooleanCheckbox"
						id="shared" value="#{shelf.shared}"/>
					<rich:message for="shared" />
				</h:panelGrid>
				</rich:graphValidator>
			</a4j:region>
			<a4j:commandButton
				oncomplete="#{shelfManager.oncomplete}"
				value="Save"
				actionListener="#{shelfManager.addShelf(shelf)}"
				id="storebutton" reRender="tree, mainArea, my_album_div_id" />
			<button type="button" id="cancelbutton"
				onclick="#{rich:component('shelfModalPanel')}.hide()">#{messages['album.cancel']}</button>
		</a4j:form>
	</rich:modalPanel>
</ui:composition>