Author: mrisaliti
Date: Fri Jun 13 15:11:00 2008 New Revision: 667668 URL: http://svn.apache.org/viewvc?rev=667668&view=rev Log: Converted some content bsh scripts to groovy (Part of issue OFBIZ-1801) Added: ofbiz/trunk/applications/content/widget/GetMenuContext.groovy - copied, changed from r667620, ofbiz/trunk/applications/content/widget/getMenuContext.bsh Removed: ofbiz/trunk/applications/content/widget/getMenuContext.bsh Modified: ofbiz/trunk/applications/content/widget/cms/CMSScreens.xml ofbiz/trunk/applications/content/widget/content/ContentScreens.xml Copied: ofbiz/trunk/applications/content/widget/GetMenuContext.groovy (from r667620, ofbiz/trunk/applications/content/widget/getMenuContext.bsh) URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/GetMenuContext.groovy?p2=ofbiz/trunk/applications/content/widget/GetMenuContext.groovy&p1=ofbiz/trunk/applications/content/widget/getMenuContext.bsh&r1=667620&r2=667668&rev=667668&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/getMenuContext.bsh (original) +++ ofbiz/trunk/applications/content/widget/GetMenuContext.groovy Fri Jun 13 15:11:00 2008 @@ -16,15 +16,17 @@ * specific language governing permissions and limitations * under the License. */ -import java.util.HashMap; + import org.ofbiz.base.util.Debug; + Debug.logInfo("In getMenuContext.", ""); -session = context.get("session"); +session = context.session; menuContext = session.getAttribute("menuContext"); Debug.logInfo("menuContext(0):" + menuContext, ""); -if (menuContext == null) { - menuContext = new HashMap(); + +if (!menuContext) { + menuContext = [:]; session.setAttribute("menuContext", menuContext); } -context.put("menuContext", menuContext); +context.menuContext = menuContext; \ No newline at end of file Modified: ofbiz/trunk/applications/content/widget/cms/CMSScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/cms/CMSScreens.xml?rev=667668&r1=667667&r2=667668&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/cms/CMSScreens.xml (original) +++ ofbiz/trunk/applications/content/widget/cms/CMSScreens.xml Fri Jun 13 15:11:00 2008 @@ -73,7 +73,7 @@ <screen name="CMSContentEdit"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="PageTitleEditCMSContent"/> <entity-one entity-name="Content" value-name="currentValue"> <field-map field-name="contentId" env-name="parameters.contentId"/> @@ -119,7 +119,7 @@ <screen name="CMSContentAdd"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="PageTitleEditContent"/> </actions> <widgets> @@ -245,7 +245,7 @@ <screen name="AdminSearch"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <script location="component://content/widget/cms/advancedsearchprep.bsh"/> <script location="component://content/widget/cms/search.bsh"/> <set field="title" value="CMS Search Page"/> @@ -284,7 +284,7 @@ <screen name="AdminIndex"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="title" value="CMS Search Page"/> <set field="titleProperty" value="PageTitleSearchContent"/> <set field="currentCMSMenuItemName" value="index" to-scope="user"/> @@ -316,7 +316,7 @@ <screen name="CMSSites"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="title" value="CMS Search Page"/> <set field="titleProperty" value="PageTitleSearchContent"/> <set field="forumId" from-field="parameters.contentId"/> @@ -355,7 +355,7 @@ <screen name="addSubSite"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="PageTitleSearchContent"/> </actions> <widgets> @@ -387,7 +387,7 @@ <screen name="TestPermission"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="Test Permission"/> </actions> <widgets> Modified: ofbiz/trunk/applications/content/widget/content/ContentScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentScreens.xml?rev=667668&r1=667667&r2=667668&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/content/ContentScreens.xml (original) +++ ofbiz/trunk/applications/content/widget/content/ContentScreens.xml Fri Jun 13 15:11:00 2008 @@ -233,7 +233,7 @@ <screen name="EditContentRole"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="PageTitleAddRole"/> <set field="tabButtonItem" value="role"/> @@ -259,7 +259,7 @@ <screen name="EditContentPurpose"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="PageTitleAddPurpose"/> <set field="tabButtonItem" value="purpose"/> <set field="contentId" from-field="parameters.contentId" /> @@ -283,7 +283,7 @@ <screen name="EditContentAttribute"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="PageTitleAddAttribute"/> <set field="tabButtonItem" value="attribute"/> <set field="contentId" from-field="parameters.contentId" /> @@ -308,7 +308,7 @@ <screen name="EditContentMetaData"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="PageTitleAddMetaData"/> <set field="tabButtonItem" value="metaData"/> <set field="contentId" from-field="parameters.contentId" /> @@ -332,7 +332,7 @@ <screen name="EditContentWorkEfforts"> <section> <actions> - <script location="component://content/widget/getMenuContext.bsh"/> + <script location="component://content/widget/GetMenuContext.groovy"/> <set field="titleProperty" value="PageTitleAddWorkEffort"/> <set field="tabButtonItem" value="workEffort"/> <set field="contentId" from-field="parameters.contentId" /> |
Free forum by Nabble | Edit this page |