Cool eye

BlogJava 首页 新随笔 联系 聚合 管理
  63 Posts :: 4 Stories :: 3 Comments :: 0 Trackbacks

In struts, there is only one tag instance with one tag, so if there is one state field in tag class, please don't forget to revert the value of the state field before returning .
For example:
public class UserDefinedTableTag   extends TagSupport
{
   private boolean isAddRichScript = false;
   public int doEndTag() throws JspException {

   
    isAddRichScript = false;
        return EVAL_PAGE;

    }
private void addNote(UserDefinedTableColumnConfig userDefinedTableColumnConfig, StringBuffer outStr) {
                if("T".equals(userDefinedTableColumnConfig.getRichHtml()))
        {
            if(!isAddRichScript)
            {
                isAddRichScript = true;
                outStr.append(richScript);
            }
            outStr.append(richHtml);
        }
            }
}

posted on 2006-01-12 16:56 joeyeezhang 阅读(214) 评论(0)  编辑  收藏 所属分类: Struts

只有注册用户登录后才能发表评论。


网站导航: