posts - 17,  comments - 6,  trackbacks - 0
          < netui-data:repeater? dataSource ="{pageFlow.customerList}" >

          ????
          < netui-data:repeaterHeader >< table? cellpadding ="4" ?border ="1"

          ????????class
          ="tablebody" ? ></ netui-data:repeaterHeader >

          ????
          < netui-data:repeaterItem >

          ????????
          < netui-data:choiceMethod? object ="{pageFlow}"

          ??????????????method
          ="getRollerState" >

          ????????????
          < netui-data:methodParameter? value ="{container.item[1]}" />

          ????????
          </ netui-data:choiceMethod >

          ????????
          < netui-data:choice? value ="low" >

          ????????????
          < tr? bgcolor ='#00FF00' >

          ????????????????
          < td >< netui:label? value ="{container.item[0]}" >

          ??????????????????????
          </ netui:label ></ td >

          ????????????????
          < td >< netui:label? value ="{container.item[1]}" >

          ??????????????????????
          </ netui:label ></ td >

          ????????????
          </ tr >

          ????????
          </ netui-data:choice >

          ????????
          < netui-data:choice? value ="high" >

          ?????????????
          < tr? bgcolor ='#FF0000' >

          ????????????????
          < td >< netui:label? value ="{container.item[0]}" >

          ??????????????????????
          </ netui:label ></ td >

          ????????????????
          < td >< netui:label? value ="{container.item[1]}" >

          ??????????????????????
          </ netui:label ></ td >

          ????????????
          </ tr >

          ????????
          </ netui-data:choice >

          ????
          </ netui-data:repeaterItem >

          ????
          < netui-data:repeaterFooter ></ table ></ netui-data:repeaterFooter >

          </ netui-data:repeater >


          The?
          < netui-data:choiceMethod > ?tag?specifies?the?Java?method?that?calculates?the?data?value.?The?method?is?determined?by?setting?the?tag's?object?and?method?attributes.?The?object?attribute?specifies?the?data?binding?context?(the?available?options?are?discussed?in?Chapter?4?in?the?section?"Data?Binding?with?Page?Flow").?In?this?case,?the?container?data?binding?context?refers?to?the?data?record?in?the?current?iteration.?Data?is?passed?into?the?Java?method?via?a?number?of?nested? < netui-data:methodParameter > ?tags,?one?for?each?parameter?of?the?Java?method.?Listing?7.4?shows?the?getRollerState()?method?in?the?Controller.jpf?file?used?in?the?Casino?example.?The?method?simply?returns?a?value?of?high?if?the?number?of?purchased?chips?is?greater?than?1,000;?otherwise,?it?returns?low.

          Listing?7.4.?Excerpt?from?Controller.jpf?Showing?the?Business?Logic?Used?to?Color-Code?Customers

          public?String?getRollerState(String?chipsPurchased)

          {

          ????int?chips?=?Integer.parseInt(chipsPurchased);

          ????if?(chips?>?1000)

          ????????return?"high";

          ????else

          ????????return?"low";

          }


          ?
          posted on 2006-06-16 11:17 風(fēng)中的舞者 閱讀(176) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          <2025年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章檔案

          java技術(shù)

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 平罗县| 罗源县| 滨州市| 新绛县| 深泽县| 建昌县| 江川县| 陇川县| 丰原市| 南阳市| 澄城县| 潼关县| 吴桥县| 天镇县| 茂名市| 田林县| 正阳县| 绿春县| 灌阳县| 古田县| 葫芦岛市| 韶山市| 竹山县| 连城县| 宝清县| 绥滨县| 思茅市| 沐川县| 淮北市| 宣武区| 凌云县| 鄂温| 石首市| 庄浪县| 沂源县| 安国市| 和平县| 盐津县| 和政县| 苏尼特左旗| 富平县|