| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 892 人关注过本帖
标题:初学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
快速回复:初学tapestry4请高手指点
数据加载中...
 
   



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

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