📄 form_jsp.xdt
字号:
<XDtTagDef:tagDef namespace="Form" handler="org.example.antbook.xdoclet.FormTagsHandler"/><%@ include file="/common/taglibs.jsp"%>
<head>
<title><fmt:message key="<XDtForm:classNameLower/>Detail.title"/></title>
<content tag="heading"><fmt:message key="<XDtForm:classNameLower/>Detail.heading"/></content>
<meta name="menu" content="<XDtForm:className/>Menu"/>
</head>
<f:view>
<f:loadBundle var="text" basename="#{<XDtForm:classNameLower/>Form.bundleName}"/>
<h:form id="<XDtForm:classNameLower/>Form" onsubmit="return validate<XDtForm:className/>Form(this)">
<XDtForm:forAllFields>
<XDtForm:ifIsIdOrVersionField>
<h:inputHidden value="#{<XDtForm:classNameLower/>Form.<XDtForm:classNameLower/>.<XDtForm:fieldName/>}" id="<XDtForm:fieldName/>"/>
</XDtForm:ifIsIdOrVersionField>
</XDtForm:forAllFields>
<h:panelGrid columns="3">
<XDtForm:forAllFields>
<XDtForm:ifIsNotIdOrVersionField>
<h:outputLabel styleClass="desc" for="<XDtForm:fieldName/>" value="#{text['<XDtForm:classNameLower/>.<XDtForm:fieldName/>']}"/>
<XDtForm:ifIsBooleanField>
<h:selectBooleanCheckbox styleClass="checkbox" id="<XDtForm:fieldName/>" value="#{<XDtForm:classNameLower/>Form.<XDtForm:classNameLower/>.<XDtForm:fieldName/>}"/>
</XDtForm:ifIsBooleanField>
<XDtForm:ifIsNotBooleanField>
<XDtForm:ifIsDateField>
<h:inputText styleClass="text medium" id="<XDtForm:fieldName/>" value="#{<XDtForm:classNameLower/>Form.<XDtForm:classNameLower/>.<XDtForm:fieldName/>}" required="true">
<v:commonsValidator type="required" arg="#{text['<XDtForm:classNameLower/>.<XDtForm:fieldName/>']}"/>
<f:convertDateTime pattern="#{text['date.format']}"/>
</h:inputText>
</XDtForm:ifIsDateField>
<XDtForm:ifIsNotDateField>
<h:inputText styleClass="text medium" id="<XDtForm:fieldName/>" value="#{<XDtForm:classNameLower/>Form.<XDtForm:classNameLower/>.<XDtForm:fieldName/>}" required="true">
<v:commonsValidator type="required" arg="#{text['<XDtForm:classNameLower/>.<XDtForm:fieldName/>']}"/>
</h:inputText>
</XDtForm:ifIsNotDateField>
</XDtForm:ifIsNotBooleanField>
<t:message for="<XDtForm:fieldName/>" styleClass="fieldError"/>
</XDtForm:ifIsNotIdOrVersionField>
</XDtForm:forAllFields>
<h:panelGroup styleClass="buttonBar bottom">
<h:commandButton value="#{text['button.save']}" action="#{<XDtForm:classNameLower/>Form.save}"
id="save" styleClass="button"/>
<c:if test="${not empty <XDtForm:classNameLower/>Form.<XDtForm:classNameLower/>.<XDtMethodEx:idField getType="propertyName"/>}">
<h:commandButton value="#{text['button.delete']}" action="#{<XDtForm:classNameLower/>Form.delete}"
id="delete" styleClass="button" onclick="bCancel=false; return confirmDelete('<XDtForm:className/>')"/>
</c:if>
<h:commandButton value="#{text['button.cancel']}" action="cancel" immediate="true"
id="cancel" styleClass="button" onclick="bCancel=true"/>
</h:panelGroup>
<h:outputText/><h:outputText/>
</h:panelGrid>
</h:form>
<v:validatorScript functionName="validate<XDtForm:className/>Form"/>
<script type="text/javascript">
Form.focusFirstElement($('<XDtForm:classNameLower/>Form'));
</script>
</f:view>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -