锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲xxxx做受欧美,亚洲伊人伊色伊影伊综合网,天堂在线一二区http://www.aygfsteel.com/joeyeezhang/category/6956.htmlzh-cnFri, 02 Mar 2007 06:50:32 GMTFri, 02 Mar 2007 06:50:32 GMT60message in strutshttp://www.aygfsteel.com/joeyeezhang/archive/2006/02/13/30423.htmljoeyeezhangjoeyeezhangMon, 13 Feb 2006 03:04:00 GMThttp://www.aygfsteel.com/joeyeezhang/archive/2006/02/13/30423.htmlhttp://www.aygfsteel.com/joeyeezhang/comments/30423.htmlhttp://www.aygfsteel.com/joeyeezhang/archive/2006/02/13/30423.html#Feedback0http://www.aygfsteel.com/joeyeezhang/comments/commentRss/30423.htmlhttp://www.aygfsteel.com/joeyeezhang/services/trackbacks/30423.html1.閿欒鍜屼俊鎭殑澶勭悊.

棣栧厛鍦ㄨ祫婧愭枃浠朵腑瀹氫箟閿欒淇℃伅鍜屾櫘閫氫俊鎭?濡?MessageResources.properties涓畾涔夊涓?
java浠g爜: 


#
# Resources for testing <html:errors> tag.
#

errors.header=<table>
errors.footer=</table>
errors.prefix=<tr><td>
errors.suffix=</td></tr>

property1error1=Property 1, Error 1
property2error1=Property 2, Error 1
property2error2=Property 2, Error 2
property2error3=Property 2, Error 3
property3error1=Property 3, Error 1
property3error2=Property 3, Error 2
globalError=Global Error

#
# Resources for testing <html:messages> tag.
#

messages.header=<table>
messages.footer=</table>

property1message1=Property 1, Message 1
property2message1=Property 2, Message 1
property2message2=Property 2, Message 2
property2message3=Property 2, Message 3
property3message1=Property 3, Message 1
property3message2=Property 3, Message 2
globalMessage=Global Message



鍦ㄧ▼搴忎腑瀹氫箟閿欒鍜屼俊鎭被,榪欎釜渚嬪瓙鍐欏湪JSP涓?

java浠g爜: 


<%
      ActionErrors errors = new ActionErrors();
      errors.add("property1", new ActionError("property1error1"));
      errors.add("property2", new ActionError("property2error1"));
      errors.add("property2", new ActionError("property2error2"));
      errors.add("property2", new ActionError("property2error3"));
      errors.add("property3", new ActionError("property3error1"));
      errors.add("property3", new ActionError("property3error2"));
      errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("globalError"));
      request.setAttribute(Globals.ERROR_KEY, errors);

      ActionMessages messages = new ActionMessages();
      messages.add("property1", new ActionMessage("property1message1"));
      messages.add("property2", new ActionMessage("property2message1"));
      messages.add("property2", new ActionMessage("property2message2"));
      messages.add("property2", new ActionMessage("property2message3"));
      messages.add("property3", new ActionMessage("property3message1"));
      messages.add("property3", new ActionMessage("property3message2"));
      messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("globalMessage"));
      request.setAttribute(Globals.MESSAGE_KEY, messages);
    %>





鏄劇ず閿欒:
java浠g爜: 


<html:errors property="property1" />
<html:errors property="property2" />


鏄劇ず淇℃伅:
java浠g爜: 


<html:messages property="property1" message="true" id="msg" header="messages.header" footer="messages.footer">
            <tr>
              <td>
                     <%= pageContext.getAttribute("msg") %>
              </td>
            </tr>
          </html:messages>

<html:messages message="true" id="msg" header="messages.header" footer="messages.footer">
            <tr>
              <td>
               <%= pageContext.getAttribute("msg") %>
              </td>
            </tr>
</html:messages>



]]>
About Tag state in strutshttp://www.aygfsteel.com/joeyeezhang/archive/2006/01/12/27789.htmljoeyeezhangjoeyeezhangThu, 12 Jan 2006 08:56:00 GMThttp://www.aygfsteel.com/joeyeezhang/archive/2006/01/12/27789.htmlhttp://www.aygfsteel.com/joeyeezhang/comments/27789.htmlhttp://www.aygfsteel.com/joeyeezhang/archive/2006/01/12/27789.html#Feedback0http://www.aygfsteel.com/joeyeezhang/comments/commentRss/27789.htmlhttp://www.aygfsteel.com/joeyeezhang/services/trackbacks/27789.htmlIn 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);
        }
            }
}



]]>
主站蜘蛛池模板: 苗栗市| 灵台县| 高碑店市| 五家渠市| 布尔津县| 双牌县| 汽车| 嘉祥县| 张家川| 胶南市| 永兴县| 错那县| 桑日县| 行唐县| 长春市| 长泰县| 峡江县| 临朐县| 茶陵县| 上虞市| 安达市| 长子县| 嘉义市| 丁青县| 日照市| 唐海县| 渝北区| 邹平县| 张掖市| 临安市| 宜君县| 平湖市| 洛浦县| 临江市| 鹤峰县| 名山县| 仲巴县| 岳普湖县| 蒙阴县| 清远市| 陆丰市|