📄 editproductconfigitemcontentcontent.bsh
字号:
/* * Copyright (c) 2003-2005 The Open For Business Project - www.ofbiz.org * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *@author David E. Jones *@author Jacopo Cappellato */import org.ofbiz.entity.*;import org.ofbiz.entity.util.*;import org.ofbiz.base.util.*;import org.ofbiz.widget.html.*;import javax.servlet.HttpServletRequest;contentId = request.getParameter("contentId");if("".equals(contentId)) contentId = null;confItemContentTypeId = request.getParameter("confItemContentTypeId");fromDate = request.getParameter("fromDate");if("".equals(fromDate)) fromDate = null;description = request.getParameter("description");if("".equals(description)) description = null;productContent = delegator.findByPrimaryKey("ProdConfItemContent", UtilMisc.toMap("contentId", contentId, "configItemId", configItemId, "confItemContentTypeId", confItemContentTypeId, "fromDate", fromDate));if(productContent == null) { productContent = new HashMap(); productContent.put("configItemId", configItemId); productContent.put("contentId", contentId); productContent.put("confItemContentTypeId", confItemContentTypeId); productContent.put("fromDate", fromDate); productContent.put("thruDate", request.getParameter("thruDate"));}context.put("productContent", productContent);productContentData = new HashMap();productContentData.putAll(productContent);Map content = null;context.put("contentId", contentId);if(contentId != null) { content = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId)); context.put("content", content);} else { content = new HashMap(); if(description != null) content.put("description", description);}HtmlFormWrapper updateProductContentWrapper = null;//Assume it is a generic simple text contenttextData = new HashMap();if (contentId != null && content != null) { textDr = content.getRelatedOne("DataResource"); if (textDr != null) { text = textDr.getRelatedOne("ElectronicText"); textData.put("text", text.get("textData")); textData.put("textDataResourceId", text.get("dataResourceId")); }}updateProductContentWrapper = new HtmlFormWrapper("/config/ConfigForms.xml", "EditProductConfigItemContentSimpleText", request, response);updateProductContentWrapper.putInContext("textData", textData);context.put("updateProductContentWrapper", updateProductContentWrapper);updateProductContentWrapper.putInContext("productContentData", productContentData);context.put("productContentData", productContentData);updateProductContentWrapper.putInContext("content", content);updateProductContentWrapper.putInContext("contentId", contentId);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -