use of io.github.zutherb.appstash.shop.ui.panel.product.RecommendationItemListPanel in project the-app by devops-dojo.
the class HomePage method topSellerPanel.
private Component topSellerPanel() {
boolean userAuthorized = isUserAuthorized();
String ressourceKey = userAuthorized ? "your.favorite.products.topic" : "category.top.seller.topic";
String recommenderType = userAuthorized ? "FAVORITE_PRODUCTS" : "STARTPAGE_TOPSELLER";
return new RecommendationItemListPanel("topSellerProductsContainer", feedback, recommenderType, new ResourceModel(ressourceKey), new LoadableDetachableModel<List<ProductInfo>>() {
@Override
protected List<ProductInfo> load() {
return recommendationService.getTopsellerRecommendations(4);
}
}) {
};
}
Aggregations