📄 configs.xhtml
字号:
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:form> <rich:toolBar> <a4j:commandLink submitMode="ajax" value="New" action="#{ConfigsBean.prepareNew}" oncomplete="javascript:Richfaces.showModalPanel('configEdit');" reRender="configEdit"/> <a4j:commandLink submitMode="ajax" value="Edit" action="#{ConfigsBean.prepareEdit}" oncomplete="javascript:Richfaces.showModalPanel('configEdit');" reRender="configEdit" /> <a4j:commandLink submitMode="ajax" value="Delete" action="#{ConfigsBean.deleteItem}" reRender="configsList" /> </rich:toolBar> <rich:spacer height="10" /> <rich:scrollableDataTable rowKeyVar="cfg_rkv" height="400px" width="700px" id="configsList" rows="40" columnClasses="col" value="#{ConfigsBean.all}" var="config" sortMode="single" selection="#{ConfigsBean.selection}"> <rich:column> <f:facet name="header"><h:outputText styleClass="headerText" value="Name" /></f:facet> <h:outputText value="#{config.name}" /> </rich:column> <rich:column> <f:facet name="header"><h:outputText styleClass="headerText" value="Hardware" /></f:facet> <h:outputText value="#{config.hardware}" /> </rich:column> <rich:column> <f:facet name="header"><h:outputText styleClass="headerText" value="File name" /></f:facet> <h:outputText value="#{config.filename}" /> </rich:column> <rich:column> <f:facet name="header"><h:outputText styleClass="headerText" value="Version" /></f:facet> <h:outputText value="#{config.version}" /> </rich:column> </rich:scrollableDataTable> </h:form> <h:form> <rich:modalPanel id="configEdit" resizeable="false" autosized="true"> <f:facet name="header"> <h:outputText value="#{ConfigsBean.edit?'Edit configuration':'New configuration'}"/> </f:facet> <f:facet name="controls"> <span style="cursor:pointer" onclick="javascript:Richfaces.hideModalPanel('configEdit')">X</span> </f:facet> <h:panelGrid columns="2"> <h:outputText value="Name:" /> <h:inputText value="#{ConfigsBean.name}" rendered="#{!ConfigsBean.edit}"/> <h:outputText value="#{ConfigsBean.name}" rendered="#{ConfigsBean.edit}"/> <h:outputText value="Hardware:" /> <h:inputText value="#{ConfigsBean.hardware}"/> <h:outputText value="File name:" /> <h:inputText value="#{ConfigsBean.filename}"/> <h:outputText value="Version:" /> <h:inputText value="#{ConfigsBean.version}"/> <h:outputText value="Config:" /> <h:inputTextarea rows="20" cols="100" value="#{ConfigsBean.cfg}"/> </h:panelGrid> <a4j:commandButton value="OK" reRender="configsList" onclick="javascript:Richfaces.hideModalPanel('configEdit')" action="#{ConfigsBean.editItem}" /> <a4j:commandButton value="Cancel" onclick="javascript:Richfaces.hideModalPanel('configEdit')" /> </rich:modalPanel> </h:form></ui:composition>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -