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

          搜索

          最新評論

          主站蜘蛛池模板: 明溪县| 含山县| 乌鲁木齐市| 伊通| 定西市| 宝鸡市| 依安县| 左云县| 信宜市| 曲靖市| 墨竹工卡县| 通州市| 咸宁市| 汉寿县| 蓬安县| 江门市| 察隅县| 墨玉县| 大姚县| 宣汉县| 上思县| 都匀市| 霞浦县| 黄山市| 伊宁县| 万州区| 景德镇市| 张家口市| 北流市| 西丰县| 尼玛县| 乌兰察布市| 钦州市| 方山县| 新蔡县| 名山县| 马关县| 城步| 五峰| 乌拉特前旗| 鄢陵县|