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

          搜索

          最新評論

          主站蜘蛛池模板: 颍上县| 股票| 财经| 太谷县| 青岛市| 阿鲁科尔沁旗| 瑞安市| 亚东县| 诸暨市| 兰考县| 鹿泉市| 翁源县| 四会市| 阿拉善左旗| 小金县| 麟游县| 观塘区| 固阳县| 五常市| 沙田区| 彭阳县| 渭南市| 衡阳市| 麻城市| 多伦县| 喀什市| 钟山县| 博爱县| 中超| 封开县| 固安县| 新化县| 西城区| 古田县| 邛崃市| 大同市| 舒兰市| 昌乐县| 太康县| 会理县| 楚雄市|