Package com.jpoweredcart.admin.form.catalog

Examples of com.jpoweredcart.admin.form.catalog.CategoryForm


  }
 
  @Override
  public CategoryForm newForm(){
   
    CategoryForm catForm = new CategoryForm();
    List<CategoryDesc> descList = languageAdminModel
        .createDescriptionList(CategoryDesc.class);
    catForm.setDescs(descList);
    List<CategoryToLayout> ctlList = new ArrayList<CategoryToLayout>();
    for(Store store: storeAdminModel.getAll()){
      CategoryToLayout ctl = new CategoryToLayout();
      ctl.setStoreId(store.getId());
      ctl.setStoreName(store.getName());
      ctlList.add(ctl);
    }
    catForm.setLayouts(ctlList);
   
    return catForm;
  }
View Full Code Here


  public CategoryForm getForm(Integer catId) {
   
    String sql = "SELECT DISTINCT *, (SELECT keyword FROM " +quoteTable("url_alias")
        + " WHERE query = ?) AS keyword FROM "
        + quoteTable("category")+" WHERE category_id = ?";
    CategoryForm catForm = (CategoryForm)getJdbcOperations().queryForObject(
        sql, new Object[]{"category_id="+catId, catId},
        new CategoryRowMapper(){
          @Override
          public Category mapRow(ResultSet rs, int rowNum)
              throws SQLException {
            CategoryForm form = (CategoryForm)super.mapRow(rs, rowNum);
            form.setKeyword(rs.getString("keyword"));
            return form;
          }
      }.setTargetClass(CategoryForm.class));
    catForm.setDescs(getDescriptions(catId));
    catForm.setStores(getCatStores(catId));
View Full Code Here

 
  @RequestMapping(value="/edit/{id}")
  public String edit(@PathVariable("id") Integer id, Model model, HttpServletRequest request){
   
    checkModifyPermission();
    CategoryForm catForm = categoryAdminModel.getForm(id);
    addFormAttributes(catForm, model, request);
   
    return "/admin/catalog/categoryForm";
  }
View Full Code Here

TOP

Related Classes of com.jpoweredcart.admin.form.catalog.CategoryForm

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.