动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > Java教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Java教程 ]的信息

本月文章推荐
.Java的一些编码基础.
.关于快速简便的使用AJAX技术操作.
.Eclipse Tanghan Plugin帮助文件.
.深入浅出基于Java的解释器设计模.
.Java RMI and .NET Remoting.
.在J2ME中实现基于UDP协议通讯程序.
.Java中引用,造型等问题解析.
.构造java函数.
.高级应用——Java动态的程序设计.
.开发框架hibernate3.0开发实例.
.谈谈TCP和UDP的一些简单应用.
.shift 方法.
.Eclipse 插件EclipseShell&.
.Java学习路径-过程篇+书籍篇.
.Java设计模式之计数代理模式.
.JBuilder常见问题解答.
.Java技巧:部署WAR文件和绑定对象.
.我的java学习经验谈1.
.servlet中实时地创建图象.
.如何给 Log4j 配上数据库连接池.

Struts Layout

发表日期:2008-1-5 |



  正如软件有他的皮肤一样,我们的系统也有自己的皮肤,假如我们的应用系统可以让不同的客户选择自己喜欢的风格,那么我们将会感到无比的开心,难道不是吗?
  可以更加轻易的使用标记库,更轻松的开发出系统风格一致的系统
  Struts基于mvc2的frameWork广泛的应用的j2ee开发领域中,
  · configure struts for the webapp
  · configure the struts-layout treeview and sort action (just copy the corresponding lines of the struts-config file of the example application)
  · copy the struts-layout.jar file into the WEB-INF/lib Directory.
  · declare the struts-layout tld file in the web.XML file
  · copy the menu.jar file from the struts-layout example application into the WEB-INF/lib directory.
  · put a version of the common BeanUtils library in the WEB-INF/lib directory if using struts 1.0
  · copy the struts-layout.tld file into the WEB-INF directory.
  · copy the files in the config and images directory of the struts-layout example application in your new webapp.
  · if forward to Tiles definition will be used with sorting or paging on the server, the struts-layout request processor
  
  example:
  ...
  <layout:form action="..." styleClass="FORM">
  <layout:grid cols="3">
  <layout:text key="Field 1" property="username1"/>
  <layout:text key="Field 2" property="username2"/>
  <layout:text key="Field 3" property="username3"/>
  <layout:text key="Field 4" property="username4"/>
  <layout:text key="Field 5" property="username5"/>
  <layout:text key="Field 6" property="username6"/>
  </layout:grid>
  <layout:grid cols="2">
  <layout:text key="Text input field 7" property="username7"/>
  <layout:text key="Text input field 8" property="username8"/>
  <layout:text key="Text input field 9" property="username9"/>
  <layout:text key="Text input field 10" property="username10"/>
  </layout:grid>
  </layout:form>
  ...
  
  ...
  <layout:form action="..." styleClass="FORM">
  <layout:row>
  <layout:collection name="users" styleClass="FORM">
  <layout:collectionItem title="users.login" property="login"/>
  <layout:collectionItem title="users.firstname" property="firstname"/>
  <layout:collectionItem title="users.lastname" property="lastname"/>
  <layout:collectionItem title="users.society" property="society"/>
  </layout:collection>
  <layout:column>
  <layout:text key="Field 1" property="username1"/>
  <layout:text key="Field 2" property="username2"/>
  <layout:text key="Field 3" property="username3"/>
  </layout:column>
  </layout:row>
  </layout:form>
  ...
  ...
  <layout:form action="..." styleClass="FORM">
  <layout:grid cols="2">
  <layout:collection name="users" styleClass="FORM" length="3">
  <layout:collectionItem title="users.login" property="login"/>
  <layout:collectionItem title="users.firstname" property="firstname"/>
  <layout:collectionItem title="users.lastname" property="lastname"/>
  <layout:collectionItem title="users.society" property="society"/>
  </layout:collection>
  <layout:column>
  <layout:text key="Field 1" property="username"/>
  <layout:text key="Field 2" property="username"/>
  <layout:text key="Field 3" property="username"/>
  </layout:column>
  </layout:grid>
  <layout:space/>
  <layout:grid cols="3">
  <layout:text key="Field 6" property="username"/>
  <layout:text key="Field 7" property="username"/>
  <layout:text key="Field 8" property="username"/>
  <layout:space/>
  <layout:text key="Field 9" property="username"/>
  <layout:space/>
  </layout:grid>
  </layout:form>
  ...
  
  
  jsp page:
  [
  
  <%@ page language="Java" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-Html.tld" prefix="html" %>
  
  <html:html locale="true">
  <head>
  <title><bean:message key="logon.title"/></title>
  <html:base/>
  </head>
  <body bgcolor="white">
  
  <html:errors/>
  
  <html:form action="/logon" focus="username">
  <table border="0" width="100%">
  
  <tr>
  <th align="right">
  <bean:message key="prompt.username"/>
  </th>
  <td align="left">
  <html:text property="username" size="16" maxlength="16"/>
  </td>
  </tr>
  
  <tr>
  <th align="right">
  <bean:message key="prompt.passWord"/>
  </th>
  <td align="left">
  <html:password property="password" size="16" maxlength="16"
  redisplay="false"/>
  </td>
  </tr>
  
  <tr>
  <td align="right">
  <html:submit property="submit" value="Submit"/>
  </td>
  <td align="left">
  <html:reset/>
  </td>
  </tr>
  
  </table>
  
  </html:form>
  
  </body>
  </html:html>
  
  ]
  
  layout page:
  [
  <%@ page language="java" %>
  <%@ taglib uri="/WEB-INF/struts-layout.tld" prefix="layout" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  <layout:html locale="true" styleClass="FORM">
  <html:errors property="org.apache.struts.action.GLOBAL_ERROR"/>
  <layout:form action="/logon.do" focus="username" key="logon.title" styleClass="FORM">
  <layout:field key="prompt.username" property="username" size="16" maxlength="16" isRequired="true" styleClass="LABEL"/>
  <layout:field key="prompt.password" property="password" size="16" maxlength="16" type="password" styleClass="LABEL" isRequired="true"/>
  <layout:formActions>
  <layout:submit property="submit" value="Submit"/>
  <layout:reset/>
  </layout:formActions>
  </layout:form>
  </layout:html>
  
  
  ,使用layout可以更加轻易的开发!
上一篇:基于Struts的权限实现 人气:680
下一篇:Struts的起源 人气:484
浏览全部Java的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-10-6 Menalto Gallery v2.3 Rc2 多国语
2008-10-6 花香盈路(Hxcms) v9.0
2008-10-6 华军软件下载系统 v1.5
2008-10-6 e107 v0.7.13
2008-10-6 (开源PHP框架) CodeIgniter v1.6
2008-10-6 PHP在线考试系统PPExam v1.2.6 b
2008-10-6 SiteDynamic企业网站管理系统 v1
2008-10-6 WebPlayer9 P2P视频点播电影整站
2008-10-6 BCMS v1.1 测试版
2008-9-29 酷狗音乐(原KuGoo)2008 v5.310 正
2008-9-29 QQTab 1.1
2008-9-29 网络传送带 Net Transport 2.64a
2008-9-29 谷歌金山词霸v1.8
2008-9-29 TweakVI 1.0 Build 1090
2008-9-29 ACDSee Pro 2.5 Build 333 汉化绿
2008-9-29 Winamp v5.541(2189) 周明波简体
2008-9-27 CCleaner 2.12.651
2008-9-27 Mozilla Thunderbird 2.0.0.17 英
  发表评论
姓 名: 验证码:
内 容:
站长工具:网站收录查询 | Google PR查询 | ALEXA排名查询 | CSS在线编辑器 | 广告代码 | js/vbs加密 | md5加密 | 进制转换 | UTF-8 转换工具 | Html转换js | Html转换asp | Html转换php | Html转换perl
实用工具:汉字翻译拼音 | 拼音字典 | 符号对照表 | 个税计算 | 实时汇率查询换算 | 经典小工具 | 汉字简繁转换 | 普通单位换算 | 公制单位换算 | 生辰老黄历 | 国内电话区号 | 国家代码与域名缩写 | 文字加密解密 | 健康查询 | 万年历 | 汉字横竖排版 | 手机号码查询 | 计算器 | ip搜索
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報
防水工事·改修工事 フットサル大会 探偵
SEO対策 中国語教室 ホームページ作成