use of io.github.zutherb.appstash.shop.ui.event.cart.AddToCartEvent in project the-app by devops-dojo.
the class ProductDetailPage method addToCartLink.
private AbstractLink addToCartLink() {
return new IndicatingAjaxLink<Void>("addToCart") {
@Override
public void onClick(AjaxRequestTarget target) {
target.add(feedback);
send(getPage(), Broadcast.BREADTH, new AddToCartEvent(target, getPage(), productInfoModel.getObject(), getTags()));
}
};
}
use of io.github.zutherb.appstash.shop.ui.event.cart.AddToCartEvent in project the-app by devops-dojo.
the class ProductItemPanel method addToCartLink.
private IndicatingAjaxLink<Void> addToCartLink() {
IndicatingAjaxLink<Void> result = new IndicatingAjaxLink<Void>("addToCartIcon") {
@Override
public void onClick(AjaxRequestTarget target) {
// send wicket event for add to cart
target.add(feedback);
send(getPage(), Broadcast.BREADTH, new AddToCartEvent(target, getPage(), productInfoModel.getObject(), getTags()));
}
};
result.setVisible(showAddToCartLink());
return result;
}
Aggregations