<input type="text" size="50" name="companyCon.name_other" class="bg"
  depends="required" msg='<bean:message key="errors.required"  arg0="NAME_OTHER"/>' arg0="NAME_OTHER"
value='<bean:write name="MstCompanyEditForm" property="companyCon.name_other" />'
看别人的代码,粉色的我知道是做是不是空验证了,且bean:write中的arg0参数是有用的,但不明白第二个arg0有什么用,请问高手,指点下...谢了.

解决方案 »

  1.   

    如果用struts的<html:text>标签时是否必须要第二个arg0. 那样的话该怎么写?
      

  2.   

    arg0 的东西是在properties中定义的东西,比如
    登录成功后,页面有“Welcome back XXX come to here!”这个
    properties中定义的
    label.welcome=Welcome back {0} come to here !
    这样在页面输出<bean:message key="label.welcome"  arg0="NAME"/>,就直接可以
    显示Welcome back Name come to here!”
    可以直接传递用户名进去的
      

  3.   

    起始那个就是预留出位置,然后在页面上填写的功能,如果你不嫌麻烦,完全可以分开写,然后拼起来
    不如
    label.welcome1=Welcome back
    label.welcome2=come to here !
    然后在页面上拼起来
      

  4.   

    那第二个呢?有必要要吗?为什么别人都写上了,难道有特殊的用途?
    还有,如果这样写  <html:text property=="companyCon.name_other" size="50" 
      depends="required" msg=' <bean:message key="errors.required"  arg0="NAME_OTHER"/>' arg0="NAME_OTHER" 
    value=' <bean:write name="MstCompanyEditForm" property="companyCon.name_other" />' />对不对呢?
      

  5.   

    是不是所有的struts标签都不可以嵌套使用呀?