コード例 #1
0
 // ===================================================================================
 //                                                                             Execute
 //                                                                             =======
 @Execute
 public HtmlResponse index(OptionalThing<Integer> pageNumber, ProductSearchForm form) {
   validate(
       form,
       messages -> {},
       () -> {
         return asHtml(path_Product_ProductListHtml);
       });
   PagingResultBean<Product> page = selectProductPage(pageNumber.orElse(1), form);
   List<ProductSearchRowBean> beans =
       page.stream()
           .map(
               product -> {
                 return mappingToBean(product);
               })
           .collect(Collectors.toList());
   return asHtml(path_Product_ProductListHtml)
       .renderWith(
           data -> {
             data.register("beans", beans);
             pagingAssist.registerPagingNavi(data, page, form);
           });
 }
コード例 #2
0
 // ===================================================================================
 //                                                                             Execute
 //                                                                             =======
 // -----------------------------------------------------
 //                                                 HTML
 //                                                ------
 @Execute
 public HtmlResponse index(WxValidatorForm form) {
   // http://localhost:8097/catalog/wx/validator/?seaInteger=1&seaFloat=2.3&landDate=2015-12-12&iksMode=true&bonvoStatus=FML
   // http://localhost:8097/catalog/wx/validator/?seaInteger=a&seaFloat=a.b&landDate=2015-12-1a&iksMode=a&bonvoStatus=ABC
   logger.debug("#type_failure Properties: {}", form.toString());
   validate(
       form,
       messages -> {},
       () -> {
         return asHtml(path_WxValidator_WxValidatorListHtml);
       });
   PagingResultBean<Product> page = selectProductPage(1, form);
   List<WxValidatorRowBean> beans =
       page.mappingList(
           product -> {
             return mappingToBean(product);
           });
   return asHtml(path_WxValidator_WxValidatorListHtml)
       .renderWith(
           data -> {
             data.register("beans", beans);
             pagingAssist.registerPagingNavi(data, page, form);
           });
 }