home.page
来自「tapestry4.0应用,特别适用于初学者」· PAGE 代码 · 共 43 行
PAGE
43 行
<?xml version="1.0" encoding="GBK"?>
<!DOCTYPE page-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
<page-specification>
<!--<property name="username"/>-->
<!--<property name="password"/>-->
<inject property="myVisit" type="state" object="visit"/>
<component id="loginForm" type="Form">
<binding name="listener" value="listener:submit"/>
<binding name="delegate" value="beans.delegate"/>
<binding name="clientValidationEnabled" value="false"/>
</component>
<bean name="delegate" class="com.cucu.tapestry.validation.MyValidationDelegate"/>
<component id="usernameLabel" type="FieldLabel">
<binding name="field" value="component:username"/>
</component>
<component id="username" type="TextField">
<binding name="value" value="username"/>
<binding name="validators"
value="validators:required[用户名不能为空],minLength=4[用户名在4位和10位之间],maxLength=10[用户名在4位和10位之间]"/>
<binding name="displayName" value="literal:用户名"/>
</component>
<component id="passwordLabel" type="FieldLabel">
<binding name="field" value="component:password"/>
</component>
<bean name="passwordValidator" class="com.tapestry4.engine.PasswordValidator"/>
<component id="password" type="TextField">
<binding name="value" value="password"/>
<binding name="hidden" value="true"/>
<binding name="validators" value="validators:required[密码不能为空],minLength=6[密码不能少于6位]"/>
<binding name="displayName" value="literal:密码"/>
</component>
</page-specification>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?