You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by si...@apache.org on 2007/04/18 20:18:42 UTC
svn commit: r530113 - in
/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility:
EditContactMech.bsh ViewContactMechs.bsh
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) {
Re: svn commit: r530113 - in /ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility: EditContactMech.bsh ViewContactMechs.bsh
Posted by "David E. Jones" <jo...@undersunconsulting.com>.
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, sichen@apache.org 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) {
>
>
Re: svn commit: r530113 - in /ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility: EditContactMech.bsh ViewContactMechs.bsh
Posted by "David E. Jones" <jo...@undersunconsulting.com>.
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, sichen@apache.org 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) {
>
>