Author: sichen
Date: Wed Apr 18 11:18:41 2007 New Revision: 530113 URL: http://svn.apache.org/viewvc?view=rev&rev=530113 Log: Improved facility bsh scripts to get facilityId from session if not in parameters. This helps other screens re-use these bsh files. Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditContactMech.bsh ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.bsh Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditContactMech.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditContactMech.bsh?view=diff&rev=530113&r1=530112&r2=530113 ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditContactMech.bsh (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditContactMech.bsh Wed Apr 18 11:18:41 2007 @@ -28,6 +28,7 @@ delegator = request.getAttribute("delegator"); String facilityId = request.getParameter("facilityId"); +if (facilityId == null) facilityId = session.getAttribute("facilityId"); context.put("facilityId", facilityId); Map mechMap = new HashMap(); Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.bsh?view=diff&rev=530113&r1=530112&r2=530113 ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.bsh (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.bsh Wed Apr 18 11:18:41 2007 @@ -25,6 +25,7 @@ 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) { |
These should all be changed to use the "parameters" Map that the Screen Widget prepares, and it takes into account (with the following priority) request attributes, request parameters, session attributes, and application (ServletContext) attributes. -David On Apr 18, 2007, at 12:18 PM, [hidden email] wrote: > Author: sichen > Date: Wed Apr 18 11:18:41 2007 > New Revision: 530113 > > URL: http://svn.apache.org/viewvc?view=rev&rev=530113 > Log: > Improved facility bsh scripts to get facilityId from session if not > in parameters. This helps other screens re-use these bsh files. > > Modified: > ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > actions/facility/EditContactMech.bsh > ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > actions/facility/ViewContactMechs.bsh > > Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > actions/facility/EditContactMech.bsh > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/facility/WEB-INF/actions/facility/EditContactMech.bsh? > view=diff&rev=530113&r1=530112&r2=530113 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > actions/facility/EditContactMech.bsh (original) > +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > actions/facility/EditContactMech.bsh Wed Apr 18 11:18:41 2007 > @@ -28,6 +28,7 @@ > delegator = request.getAttribute("delegator"); > > String facilityId = request.getParameter("facilityId"); > +if (facilityId == null) facilityId = session.getAttribute > ("facilityId"); > context.put("facilityId", facilityId); > > Map mechMap = new HashMap(); > > Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > actions/facility/ViewContactMechs.bsh > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ > webapp/facility/WEB-INF/actions/facility/ViewContactMechs.bsh? > view=diff&rev=530113&r1=530112&r2=530113 > ====================================================================== > ======== > --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > actions/facility/ViewContactMechs.bsh (original) > +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/ > actions/facility/ViewContactMechs.bsh Wed Apr 18 11:18:41 2007 > @@ -25,6 +25,7 @@ > 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) { > > smime.p7s (3K) Download Attachment |
Free forum by Nabble | Edit this page |