在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 劉錚 閱讀(303) 評論(0)  編輯  收藏 所屬分類: Tapestry

          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          留言簿(1)

          文章分類(141)

          文章檔案(147)

          搜索

          最新評論

          主站蜘蛛池模板: 太白县| 金昌市| 琼中| 柏乡县| 攀枝花市| 安庆市| 元阳县| 铁岭县| 青川县| 洛浦县| 云霄县| 九龙县| 平塘县| 江达县| 延川县| 贵州省| 曲水县| 哈巴河县| 黄山市| 富阳市| 桃园县| 乌拉特前旗| 三台县| 衡阳市| 芜湖县| 宁安市| 凉城县| 福贡县| 锦州市| 彰化县| 定陶县| 安平县| 四会市| 伊金霍洛旗| 贡嘎县| 读书| 龙岩市| 金沙县| 岗巴县| 枣强县| 平遥县|