泰仔在線

          java學(xué)習(xí),心情日記,繽紛時(shí)刻
          posts - 100, comments - 34, trackbacks - 0, articles - 0
          這是struts-bean.tld 中write的配置:
          <tag>
          <name>write</name>
          <tagclass>org.apache.struts.taglib.bean.WriteTag</tagclass>
          <bodycontent>empty</bodycontent>
          <attribute>
          <name>bundle</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
          <name>filter</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
          <name>format</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
          <name>formatKey</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
          <name>ignore</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
          <name>locale</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
          <name>name</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
          <name>property</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          <attribute>
          <name>scope</name>
          <required>false</required>
          <rtexprvalue>true</rtexprvalue>
          </attribute>
          </tag>
          </taglib>


          其中:
          <name>write</name>:這個(gè)Tag的名字
          <tagclass>org.apache.struts.taglib.bean.WriteTag</tagclass>:這個(gè)Tag是由那個(gè)類實(shí)現(xiàn)的(這個(gè)class可以在struts.jar包中找到)
          <bodycontent>empty</bodycontent>:這個(gè)Tag可以直接結(jié)尾,不需要填寫內(nèi)容
             這里bodycontent有三個(gè)可選值
                jsp        標(biāo)簽體由其他jsp元素組成   
                   如果其有jsp元素,那么標(biāo)簽會(huì)先解釋,然后將元素的實(shí)際值傳入。比如標(biāo)簽體里含有<%=attributeName%>這樣子的jsp元素,此時(shí)標(biāo)簽會(huì)按attributeName的實(shí)際值是什么就傳入什么。這個(gè)是最常用的一個(gè)。
                empty   標(biāo)簽體必須為空   
                   在引用這個(gè)Tag的時(shí)候,可以<bean:write bundle="attributeName" />,而不必<bean:write bundle="attributeName" ></bean:write> 
                tagdependent   由標(biāo)簽解釋,不帶jsp轉(zhuǎn)換 
          <attribute> </attribute>這里標(biāo)識(shí)的是這個(gè)Tag的一個(gè)參數(shù)
          <name>bundle</name>這個(gè)參數(shù)的名字
          <required>false</required>這個(gè)參數(shù)是否是必填相
                如果為true則必須寫這個(gè)參數(shù),否則會(huì)報(bào)錯(cuò)
          <rtexprvalue>true</rtexprvalue>是說(shuō)這個(gè)標(biāo)簽的值可以寫入
                rtexprvalue:"RUN-TIME EXPRESSION VALUE",是否可以動(dòng)態(tài)賦值,在jsp中如value="<%=attributeName%>"

          Feedback

          # re: 關(guān)于struts中tld 文件里配置詳解  回復(fù)  更多評(píng)論   

          2008-01-21 15:43 by langchao826
          太謝謝你了!

          # re: 關(guān)于struts中tld 文件里配置詳解  回復(fù)  更多評(píng)論   

          2013-01-04 14:08 by sssssss
          不錯(cuò)不錯(cuò)
          主站蜘蛛池模板: 孝昌县| 区。| 桐城市| 霍城县| 乡城县| 普陀区| 秦皇岛市| 淅川县| 彰化县| 永嘉县| 荣昌县| 榆中县| 山阴县| 建宁县| 南宁市| 吉木乃县| 门头沟区| 乐亭县| 武山县| 锡林郭勒盟| 华容县| 秭归县| 岳阳县| 海城市| 肃南| 开平市| 柳河县| 名山县| 吕梁市| 廉江市| 体育| 漠河县| 博白县| 陈巴尔虎旗| 元朗区| 铅山县| 兴宁市| 宣汉县| 得荣县| 延安市| 晋宁县|