解决方法:针对不同的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";
}
}