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:
Si Chen
2007-04-18 18:18:41 +00:00
parent 74551ebe9b
commit 77dbe9be20
2 changed files with 2 additions and 0 deletions
@@ -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) {