struts 标签 HTML:MESSAGES和HTML:ERRORS 用法简例
来源:互联网 发布:嘉兴菜鸟网络 编辑:程序博客网 时间:2024/06/06 04:12
(1)<html:messages> 使用
Action 中 :
ActionMessages message = new ActionMessages();
message.add(" 消息句柄 ",new ActionMessage(" 资源文件中 Key 值 ",String 类型描述信息 ));
this.addMessages(request,message);
return ActionForward;
JSP 页面中 :
<html:messages id=" 指定使用消息的标识 " property=" 消息句柄 " message="true|false">
<bean:write name=" 以上所指 ID 标识 "/>
</html:messages>
(2)<html:errors>使用
Action 中 :
ActionMessages message = new ActionMessages();
message.add(" 消息句柄 ",new ActionMessage(" 资源文件中 Key 值 ",String 类型描述信息 ));
this.saveErrors(request,message);
return ActionForward;
JSP 页面中 :
<html:errors property=" 消息句柄 "/>
如果Action中这样设定(false),页面的提示信息将不从资源文件里读取:
ActionMessages message = new ActionMessages();
message.add("消息句柄",new ActionMessage("String类型描述信息));",false));
this.saveErrors(request,message);
return ActionForward;
JSP页面:
<html:errors/>或<html:errors property="消息句柄"/>
- struts 标签 HTML:MESSAGES和HTML:ERRORS 用法简例
- [struts]HTML:MESSAGES和HTML:ERRORS用法简例
- [struts]HTML:MESSAGES和HTML:ERRORS用法简例
- [struts]HTML:MESSAGES和HTML:ERRORS用法简例
- [struts]HTML:MESSAGES和HTML:ERRORS用法简例
- [struts]HTML:MESSAGES和HTML:ERRORS用法简例
- [struts]HTML:MESSAGES和HTML:ERRORS用法简例
- [struts]HTML:MESSAGES和HTML:ERRORS用法简例
- [struts]HTML:MESSAGES和HTML:ERRORS用法简例
- [转][struts]标签 HTML:MESSAGES和HTML:ERRORS用法简例
- [转][struts]标签 HTML:MESSAGES和HTML:ERRORS用法简例
- HTML:MESSAGES,HTML:ERRORS,用法
- html errors和html messages
- html:messages 标签用法之一
- 关于html:errors与html:messages标签的问题
- struts 标签 HTML:MESSAGES 使用范例
- html:errors标签与ActionMessage和Struts资源文件指南
- html:errors标签与ActionMessage和Struts资源文件指南
- Anders将重返Delphi舞台?(图)
- RedBlackTree(红黑树)--一种自平衡(最优)的二叉搜索树算法
- Best Practices for Speeding Up Your Web Site(网络图片优化规则)
- ASP.NET项目开发中的异常处理
- RIA(Rich Internet Application)应用开发工程师(初级)
- struts 标签 HTML:MESSAGES和HTML:ERRORS 用法简例
- makefile的基本结构和预定义变量
- 购买笔记本指南!!
- 基于AD的用户组织目录树选择工具的解决方案
- 今日工作(20090507)
- CRM下午茶(20)-客户关系管理寻根
- Java与C++之JNI编程小结
- 三十岁前男人需要完成的事
- MapXtreme的一些基础概念