在tapestry中解決不同的submit的方法

          解決方法:針對不同的submit使用不同的監聽器

          例如:
          <page-sepecification>
              <component id="productAcionForm" type="Form">
              </component>
            <component id="addToCart" type="Submit">
              <binding name="action" value=" listener:addToCart"/>
              </component>
            <component id="continueShopping" type="Submit">
              <binding name="action" value=" listener:continueShopping"/>
              </component>
          </page-sepecification>


          public class ProductDetails extends BasePage {
          public void addToCart() {
          //add product to cart
          //...
          }
          public String continueShopping() {
          return "Home";
          }
          }

          posted on 2007-11-04 12:02 劉錚 閱讀(299) 評論(0)  編輯  收藏 所屬分類: Tapestry

          <2025年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          導航

          統計

          留言簿(1)

          文章分類(141)

          文章檔案(147)

          搜索

          最新評論

          主站蜘蛛池模板: 礼泉县| 屏南县| 车险| 华亭县| 运城市| 泌阳县| 浦县| 中超| 探索| 斗六市| 南郑县| 新和县| 山丹县| 彭泽县| 虎林市| 故城县| 灵台县| 新乡县| 同江市| 马边| 丰顺县| 绍兴县| 山西省| 商水县| 屏东县| 铜陵市| 班玛县| 建德市| 平舆县| 平武县| 伊通| 惠安县| 建始县| 廉江市| 彝良县| 武隆县| 德江县| 阳春市| 吉首市| 姜堰市| 阿拉善左旗|