标题:初学tapestry4请高手指点
取消只看楼主
winterfeng8586
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-8-9
 问题点数:0 回复次数:1 
初学tapestry4请高手指点
Home.html
<html>
    <body jwcid = "@Body">
        <table width="33%" border="1">
            <form jwcid="loginForm" >
            <tr>
                <td width="32%" align="center">
                    登陆
                </td>
                <td width="68%" align="center" valign="middle">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td width="32%" align="left">
                    用户名:
                </td>
                <td width="68%" align="left">
                    <input type="text" jwcid="username" />
                </td>
            </tr>
            <tr>
                <td align="left">
                    密码:
                </td>
                <td align="left">
                    <input type="password" jwcid="password" />
                </td>
            </tr>
            <tr>
                <td align="left">
                    &nbsp;
                </td>
                <td align="center">
                    <input type="Submit" value="登陆" />
                </td>
            </tr>
            </form>
        </table>
    </body>
</html>


Home.page
<?xml version="1.0" encoding="GBK"?>
<!DOCTYPE page-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
"http://jakarta. >

<page-specification >
   
    <property name="username" />
    <property name="password" />
   
    <component id="loginForm" type="Form">
        <binding name="listener" value="listener:loginSubmit" />    
        <binding name="clientValidationEnabled" value="true"/>
      </component>  
    <component id="username" type="TextField">
        <binding name="value" value="username"/>
        <binding name="validators" value="validators:required"/>
        <binding name="displayName" value="literal:用户名"/>
    </component>
    <component id="password" type="TextField">
        <binding name="value" value="password"/>
        <binding name="hidden" value="true"/>
         <binding name="validators" value="validators:required,minLength=6"/>
        <binding name="displayName" value="literal:密码"/>
    </component>
    
 </page-specification>


为啥我的验证不管用呢?
搜索更多相关主题的帖子: 初学 Home 用户名 
2008-08-09 21:03
winterfeng8586
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2008-8-9
得分:0 
版主。。。。
2008-08-10 19:02



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-227503-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.228246 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved