泰仔在線

          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>是說這個(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ò)
          主站蜘蛛池模板: 安丘市| 青岛市| 青冈县| 改则县| 临猗县| 连南| 达拉特旗| 新民市| 康定县| 乐亭县| 靖边县| 漯河市| 甘孜| 徐闻县| 固安县| 长垣县| 揭东县| 宜兴市| 胶南市| 乃东县| 西乡县| 塘沽区| 永和县| 漯河市| 德江县| 洪雅县| 伽师县| 鄂托克前旗| 长海县| 永年县| 塔城市| 达孜县| 长寿区| 开阳县| 南川市| 高阳县| 随州市| 辉南县| 碌曲县| 如皋市| 万州区|