📄 manage_directories_list.xhtml
字号:
<?xml version="1.0" encoding="UTF-8"?><ui:composition xmlns="http://www.w3.org/1999/xhtml" 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:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" template="/skins/default/manage_template.xhtml"> <ui:param name="MenuSelectItem" value="2" /> <ui:define name="LeftNav"> <ui:include src="content_menu.xhtml"> <ui:param name="selectedMenu" value="directories" /> </ui:include> </ui:define> <ui:define name="EFPTitle"> <h:outputText value="Directories" /> </ui:define> <ui:define name="OpFormTitle"> <h:outputText value="[Contents]/[Directories]" /> </ui:define> <ui:define name="EFPForm"> <h:panelGrid columns="1"> <rich:panel id="RerenderFolderName"> You will create a folder under the folder /<a4j:repeat id="folder2" value="#{DirectoryMBean.parentParent}" var="prt"> <h:outputText value="#{prt.name}/" /> </a4j:repeat>. </rich:panel> <h:panelGrid columns="2"> <h:outputText value="Path"/> <h:inputText id="path" value="#{DirectoryMBean.instance.name}"/> <h:outputText value=""/> <h:panelGrid columns="2"> <a4j:commandButton image="/images/but_qd.gif" action="#{DirectoryMBean.save}" reRender="DirectoryForm:DirectoryGrid" value="Add" oncomplete="Richfaces.hideModalPanel('EFP');"> </a4j:commandButton> <h:commandButton image="/images/but_qx2.gif" value="Close" onclick="Richfaces.hideModalPanel('EFP'); return false;"/> </h:panelGrid> </h:panelGrid> </h:panelGrid> <h:inputHidden id="id" value="#{DirectoryMBean.instance.id}"/> <h:inputHidden id="parentId" value="#{DirectoryMBean.parent.id}"/> </ui:define> <ui:define name="ContentBody"> <rich:modalPanel id="CreateContent"> <f:facet name="header"> Create new file </f:facet> <f:facet name="controls"> <h:form> <h:commandButton image="/images/close.gif" onclick="Richfaces.hideModalPanel('CreateContent'); return false;" style="cursor:pointer" /> </h:form> </f:facet> <h:form id="EditContentForm"> <h:panelGrid columns="1"> <rich:panel id="RerenderFolderName"> You will create a new file under the folder /<a4j:repeat id="folder2" value="#{DirectoryMBean.parentParent}" var="prt"> <h:outputText value="#{prt.name}/" /> </a4j:repeat>. </rich:panel> <h:panelGrid columns="2"> <h:outputText value="File name"/> <h:inputText id="path" value="#{DirectoryMBean.instance.name}"/> <h:outputText value="File Type"/> <h:selectOneMenu value=""> <f:selectItem itemLabel="Web Page" itemValue="7t" /> <f:selectItem itemLabel="JPEG" itemValue="jpg" /> <f:selectItem itemLabel="GIF" itemValue="gif" /> <f:selectItem itemLabel="PNG" itemValue="png" /> <f:selectItem itemLabel="Office Word" itemValue="doc" /> <f:selectItem itemLabel="Adobe PDF" itemValue="pdf" /> <f:selectItem itemLabel="Office Excel" itemValue="xls" /> <f:selectItem itemLabel="Power Point Slides" itemValue="ppt" /> <f:selectItem itemLabel="Other Files" itemValue="*" /> </h:selectOneMenu> <h:outputText value=""/> <h:panelGrid columns="2"> <a4j:commandButton image="/images/but_qd.gif" action="#{DirectoryMBean.save}" reRender="DirectoryForm:DirectoryGrid" value="Add" oncomplete="Richfaces.hideModalPanel('CreateContent');"> </a4j:commandButton> <h:commandButton image="/images/but_qx2.gif" value="Close" onclick="Richfaces.hideModalPanel('CreateContent'); return false;"/> </h:panelGrid> </h:panelGrid> </h:panelGrid> <h:inputHidden id="id" value="#{DirectoryMBean.instance.id}"/> <h:inputHidden id="parentId" value="#{DirectoryMBean.parent.id}"/> </h:form> </rich:modalPanel> <a4j:form id="DirectoryForm" ajaxSubmit="true" reRender="DirectoryPanel,reRenderPanel"> <rich:panel id="reRenderPanel"> <h:panelGrid columns="5"> <a4j:commandLink action="#{DirectoryMBean.listChildren}" reRender="DirectoryForm:DirectoryGrid" value="Folder://"> <f:param name="parentId" value="0"/> </a4j:commandLink> <a4j:repeat id="folder" value="#{DirectoryMBean.parentParent}" var="prt"> <a4j:commandLink action="#{DirectoryMBean.listChildren}" reRender="DirectoryForm:DirectoryGrid" value="#{prt.name}/"> <f:param name="parentId" value="#{prt.id}"/> </a4j:commandLink> </a4j:repeat> <h:outputText value=" "/> <a4j:commandLink action="#{DirectoryMBean.findById}" reRender="EditForm:RerenderFolderName, EditForm:path,EditForm:parentId, EditForm:id" value="Create folder" oncomplete="Richfaces.showModalPanel('EFP', {top:'200px', left:'200px', height:'200'});"> <f:param name="id" value="0"/> <f:param name="parentId" value="#{DirectoryMBean.parent.id}"/> </a4j:commandLink> <a4j:commandLink action="#{DirectoryMBean.findById}" reRender="EditContentForm:RerenderFolderName" value="Create File" oncomplete="Richfaces.showModalPanel('CreateContent', {top:'200px', left:'200px', height:'200'});"> <f:param name="id" value="0"/> <f:param name="parentId" value="#{DirectoryMBean.parent.id}"/> </a4j:commandLink> </h:panelGrid> </rich:panel> <rich:panel id="DirectoryPanel"> <rich:dataTable id="DirectoryGrid" value="#{DirectoryMBean.children}" rendered="#{DirectoryMBean.hasChildren}" var="item" columns="8" cellspacing="0" cellpadding="100" border="0"> <h:column> <a4j:commandButton action="#{DirectoryMBean.listChildren}" image="/images/folder_big.png" reRender="EditForm:path,EditForm:parentId, EditForm:id,DirectoryForm:DirectoryGrid" value="#{item.name}"> <f:param name="parentId" value="#{item.id}"/> </a4j:commandButton> </h:column> <h:column> <a4j:commandLink action="#{DirectoryMBean.listChildren}" reRender="DirectoryForm:DirectoryGrid" value="#{item.name}"> <f:param name="parentId" value="#{item.id}"/> </a4j:commandLink> </h:column> </rich:dataTable> <rich:panel id="msgpanel" rendered="#{!DirectoryMBean.hasChildren}" > No folder or file. Please create a folder or create a content first. </rich:panel> </rich:panel> </a4j:form> <a4j:log hotkey="B"/> </ui:define> </ui:composition>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -