在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)

          搜索

          最新評論

          主站蜘蛛池模板: 和政县| 寿宁县| 婺源县| 乐昌市| 淅川县| 来宾市| 朝阳市| 方正县| 恩施市| 宜城市| 海南省| 大田县| 禹州市| 盖州市| 东乌珠穆沁旗| 百色市| 泗洪县| 五原县| 临夏县| 高青县| 申扎县| 烟台市| 望谟县| 大城县| 马关县| 无为县| 贵德县| 肇源县| 崇仁县| 墨竹工卡县| 石景山区| 眉山市| 亚东县| 南投市| 当雄县| 安多县| 韶山市| 高安市| 成安县| 天祝| 宣威市|