Package cn.webwheel.results

Examples of cn.webwheel.results.TemplateResult


  public Object viewProduct() {
    if (productId != null) {
      itemList = catalogService.getItemListByProduct(productId);
      product = catalogService.getProduct(productId);
    }
    return new TemplateResult(this, VIEW_PRODUCT);
  }
View Full Code Here


    @Action
  public Object viewItem() {
    item = catalogService.getItem(itemId);
    product = item.getProduct();
    return new TemplateResult(this, VIEW_ITEM);
  }
View Full Code Here

    @Action
  public Object searchProducts() {
    if (keyword == null || keyword.length() < 1) {
      setMessage("Please enter a keyword to search for, then press the search button.");
      return new TemplateResult(this, ERROR);
    } else {
      productList = catalogService.searchProductList(keyword.toLowerCase());
      return new TemplateResult(this, SEARCH_PRODUCTS);
    }
  }
View Full Code Here

        ensureLoginPage();

        if (ps < 1 || ps > 200) ps = 30;
        ensureLoginPage();
        users = userService.listUser(p, ps);
        return new TemplateResult(this);
    }
View Full Code Here

            category = boardService.findCategory(id);
            if (category == null) {
                return new ErrorResult(404);
            }
        }
        return new TemplateResult(this);
    }
View Full Code Here

            user = userService.findUser(id);
            if (user == null) {
                return new ErrorResult(404);
            }
        }
        return new TemplateResult(this);
    }
View Full Code Here

            board = boardService.findBoard(id);
            if (board == null) {
                return new ErrorResult(404);
            }
        }
        return new TemplateResult(this);
    }
View Full Code Here

      boolean isInStock = catalogService.isItemInStock(workingItemId);
      Item item = catalogService.getItem(workingItemId);
      cart.addItem(item, isInStock);
    }

    return new TemplateResult(this, VIEW_CART);
  }
View Full Code Here

    Item item = cart.removeItemById(workingItemId);

    if (item == null) {
      setMessage("Attempted to remove null CartItem from Cart.");
      return new TemplateResult(this, ERROR);
    } else {
      return new TemplateResult(this, VIEW_CART);
    }
  }
View Full Code Here

      } catch (Exception e) {
        //ignore parse exceptions on purpose
      }
    }

    return new TemplateResult(this, VIEW_CART);
  }
View Full Code Here

TOP

Related Classes of cn.webwheel.results.TemplateResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.