Package org.simplecart.shopcart.catalog

Examples of org.simplecart.shopcart.catalog.Product


                (HttpServletRequest) pageContext.getRequest();
        StringBuffer url = new StringBuffer(request.getContextPath());
        url.append(config.getPrefix());
        url.append(page);
        url.append(".do");
        Product product = null;
        try {
            product = (Product) pageContext.findAttribute(name);
        } catch (ClassCastException e) {
            product = null;
        }
        if (product == null && !this.activity.equals("enter"))
            throw new JspException
                    (messages.getMessage("error.generalMessage", name));
        if (page.indexOf("?") < 0)
            url.append("?");
        else
            url.append("&");
        url.append("activity=");
        url.append(this.activity);
        if (!this.activity.equals("enter")) {
            url.append("&productId=");
            url.append(TagUtils.getInstance().filter(product.getId().toString()));
        }
       
        // Generate the hyperlink start element
        HttpServletResponse response =
                (HttpServletResponse) pageContext.getResponse();
View Full Code Here


                    new ActionMessage("error.databaseDAO"));
        }
       
       
        // find product objects and attach to request
        Product product = (Product) pdao.findById(viewForm.getProductId(),false);

        // now add this collection to the request
        request.setAttribute(Constants.OBJECT_PRODUCT, product);
       
        cat.debug("Product object is: " + product);
        cat.debug("Product object contains " + product.getConsumerVisibleProductOptions().length + " options ");

        // now add the options to the request too
        request.setAttribute(Constants.COLLECTION_OPTION_KEY, product.getConsumerVisibleProductOptions());

        // commit Hibernate transaction and close Session
        HibernateUtility.commitTransaction();
        HibernateUtility.closeSession();
       
View Full Code Here

       
        // extract id from the request
        Long id = Long.decode(request.getParameter("productId"));
       
        // get Product object
        Product product = loadProduct(id);
       
        // create a productForm from a CatalogItemForm
        productForm = (CatalogItemForm) form;
       
        // copy properties to form-bean
        PropertyUtils.copyProperties(productForm, product);
        PropertyUtils.copyProperties(productForm, product.getSearchDetails());
        productForm.setActivity(Constants.EDIT_PAGE_KEY);
        productForm.setId(product.getId());
        //productForm.setCategoryId(product.getCategory().getId());
       
        // need categories to choose a parent for this product
        cdao = new InternetProductCategoryDAO();
        if (cdao == null){
View Full Code Here

       
        // extract id from the request
        Long id = Long.decode(request.getParameter("productId"));
       
        // get Product object
        Product product = loadProduct(id);
       
        // create a productForm from a CatalogItemForm
        productForm = (CatalogItemForm) form;
       
        // copy properties to form-bean
        PropertyUtils.copyProperties(productForm, product);
        PropertyUtils.copyProperties(productForm, product.getSearchDetails());
        productForm.setActivity(Constants.DELETE_PAGE_KEY);
        productForm.setId(product.getId());
       
        // need categories to choose a parent for this product
        cdao = new InternetProductCategoryDAO();
        if (cdao == null){
            errors.add(
View Full Code Here

                    ActionMessages.GLOBAL_MESSAGE,
                    new ActionMessage("error.database"));
            return null;
        }
       
        Product product = null;

        try {
            // find stake objects and attach to request
            product = dao.findById(id, false);
            //Hibernate.initialize(product.getOptions());
View Full Code Here

TOP

Related Classes of org.simplecart.shopcart.catalog.Product

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.