Improved facility bsh scripts to get facilityId from session if not in parameters. This helps other screens re-use these bsh files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@530113 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -28,6 +28,7 @@ import org.ofbiz.webapp.control.*;
|
||||
delegator = request.getAttribute("delegator");
|
||||
|
||||
String facilityId = request.getParameter("facilityId");
|
||||
if (facilityId == null) facilityId = session.getAttribute("facilityId");
|
||||
context.put("facilityId", facilityId);
|
||||
|
||||
Map mechMap = new HashMap();
|
||||
|
||||
@@ -25,6 +25,7 @@ context.put("nowStr", UtilDateTime.nowTimestamp());
|
||||
delegator = request.getAttribute("delegator");
|
||||
|
||||
facilityId = request.getParameter("facilityId");
|
||||
if (facilityId == null) facilityId = session.getAttribute("facilityId");
|
||||
facility = delegator.findByPrimaryKey("Facility", UtilMisc.toMap("facilityId", facilityId));
|
||||
facilityType = null;
|
||||
if (facility == null) {
|
||||
|
||||
Reference in New Issue
Block a user