public Link getNameLink(Product product, PresentationObject nameText, boolean useAnchor) throws RemoteException { Link productLink; if (this._productIsLink) { if (useAnchor) { productLink = new AnchorLink(nameText, getAnchorString(product.getID())); } else { productLink = new Link(nameText); } productLink.addParameter(ProductBusinessBean.PRODUCT_ID, product.getID()); if (this._productLinkPage != null) { productLink.setPage(this._productLinkPage); } else if (this._windowString != null) { productLink.setWindowToOpenScript(this._windowString); } if (this._addCategoryID) { try { if (this.productCategories != null && this.productCategories.size() > 0 && this._useParameterCategory) { List list = this.productCategories; if (list != null) { Iterator iter = list.iterator(); while (iter.hasNext()) { productLink.addParameter(CATEGORY_ID, ((ICCategory) iter.next()).getID()); } } } else { List list = getProductBusiness().getProductCategories(product); if (list != null) { Iterator iter = list.iterator(); while (iter.hasNext()) { productLink.addParameter(CATEGORY_ID, ((ProductCategory) iter.next()).getID()); } } } } catch (IDORelationshipException e) { } // productLink.addParameter(CATEGORY_ID,product.g); } return productLink; } else { return null; } }
Link getProductEditorLink(Product product) throws RemoteException { Link link = ProductEditorWindow.getEditorLink(product.getID()); link.setImage(this.iEdit); link.addParameter( ProductEditorWindow.PRODUCT_CATALOG_OBJECT_INSTANCE_ID, this.getICObjectInstanceID()); link.setToolTip( this.iwrb.getLocalizedString( "trade.product_catalog.edit_this_product", "Edit this product (" + product.getProductName(this._currentLocaleId) + ")")); return link; }
protected String getCacheState(IWContext iwc, String cacheStatePrefix) { Product prod = getSelectedProduct(iwc); // System.out.println("[ProductCatalog] gettingCacheState"); String returnString = cacheStatePrefix + getICObjectInstanceID(); if (iwc.isParameterSet(CATEGORY_ID)) { returnString = returnString + "_" + iwc.getParameter(CATEGORY_ID); } if (prod != null) { returnString = returnString + "_" + prod.getID(); } return returnString; }