📄 editsupplierfeature.bsh
字号:
/* *@author Si Chen *@version $Revision: 5462 $ *@since 3.0 */ /* * Prepares forms for editing and creating new supplier information for product features */import org.ofbiz.base.util.*;import org.ofbiz.base.util.UtilMisc;import org.ofbiz.service.GenericDispatcher;import org.ofbiz.service.ModelService;import org.ofbiz.widget.html.HtmlFormWrapper;dispatcher = request.getAttribute("dispatcher");productFeatureId = request.getParameter("productFeatureId");locale = UtilHttp.getLocale(request);request.setAttribute("locale",locale);uiLabelMap = UtilProperties.getResourceBundleMap("ProductUiLabels", locale);uiLabelMap.addBottomResourceBundle("CommonUiLabels");request.setAttribute("uiLabelMap", uiLabelMap);if (productFeatureId != null) { result = dispatcher.runSync("getSupplierProductFeatures", UtilMisc.toMap("productFeatureId", productFeatureId)); if (result.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_SUCCESS)) { supplierProductFeatures = result.get("supplierProductFeatures"); HtmlFormWrapper editSupplierFeaturesForm = new HtmlFormWrapper("/feature/FeatureForms.xml", "EditSupplierProductFeatures", request, response); editSupplierFeaturesForm.putInContext("supplierProductFeatures", supplierProductFeatures); context.put("editSupplierFeaturesForm", editSupplierFeaturesForm); } HtmlFormWrapper createSupplierFeatureForm = new HtmlFormWrapper("/feature/FeatureForms.xml", "CreateSupplierProductFeature", request, response); // we are fooling the form with a dummy productFeature map, which consists only of a productFeatureId createSupplierFeatureForm.putInContext("productFeature", UtilMisc.toMap("productFeatureId", productFeatureId)); context.put("createSupplierFeatureForm", createSupplierFeatureForm);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -