Struts源码分析2:org.apache.struts.action.ActionErrors

by sundy 8/7/2009 11:54:47 AM

前言:发现很多j2ee的程序员基础都差得不行 ,会用ssh的甚至都不知道为何要这样,以及如何设计的 。因此为大家简单的剖析一下Struts的设计 ,以资借鉴 。

ActionErrors的源代码:

package org.apache.struts.action; 
import java.io.Serializable;
/**
*  一个用来压缩 (encapsulates) 错误信息的类。错误信息来自ActionForm的validate()的方法。
*  验证错误可能与整个ActionForm bean相关,也可能只针对一个bean属性。
*
*
* 每个单独的错误由一个ActionMessager对象来描述。
* 一个ActionMessager包含一个massage key。
*and up to four placeholder arguments used for parametric substitution in the resulting message.
*等于用于在resulting message中进行参数替换的4个占位符(placeholder)属性。??

*
* IMPLEMENTATION (执行) NOTE:假定这些对象在创建和操作中都
* 在同一个线程中,因此不需要同步。
*
*/
public class ActionErrors extends ActionMessages implements Serializable {
// --------------------------------------------------------- Public Methods
/**
     *  构造方法:创建空的 ActionErrors对象。
*/
public ActionErrors() {
super();
    }
/**
     * 用给的的Messages 初始化创建 ActionErrors对象    
     * @param messages The messages to be initially added to this object. This
     *                 parameter can be null
*/
public ActionErrors(ActionErrors messages) {
super(messages);
    }
}

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Java & OpenSource Domain

Related posts

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2007 - 2008 Design by Sundy Linghua-Zhang 蜀ICP备08108648号

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012

Sign in