Hi,

I would also like to add one more thing that when we write bsh which one should be prefer and when from context and parameters means what are scenarios when we should prefer context to put values and when we should prefer parameters.

Thanks and Regards
--
Pranay Pandey

Ritz123 wrote:
Hi,

Can someone point(answer) where is the context and parameters object which
is available in BSH initialized/created? Is it part of the request like
delegator and/or other objects are?

e.g. /ofbiz/applications/order/webapp/ordmgr/.../category.bsh has
import org.ofbiz.base.util.*;
import org.ofbiz.entity.*;
import org.ofbiz.product.catalog.*;
import org.ofbiz.product.category.CategoryWorker;
import org.ofbiz.product.category.CategoryContentWrapper;

detailScreen = "categorydetail";
catalogName = CatalogWorker.getCatalogName(request);

productCategoryId = request.getAttribute("productCategoryId");
if (productCategoryId == null) {
    productCategoryId = parameters.get("category_id");
}
context.put("productCategoryId", productCategoryId);

Reply via email to