Added: ofbiz/branches/addbirt/framework/birt/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/widget/CommonScreens.xml?rev=831503&view=auto ============================================================================== --- ofbiz/branches/addbirt/framework/birt/widget/CommonScreens.xml (added) +++ ofbiz/branches/addbirt/framework/birt/widget/CommonScreens.xml Sat Oct 31 01:22:47 2009 @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + + <screen name="main-decorator"> + <section> + <actions> + <!-- base/top/specific map first, then more common map added for shared labels --> + <property-map resource="BirtUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + + <set field="layoutSettings.companyName" from-field="uiLabelMap.BirtCompanyName" global="true"/> + <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.BirtCompanySubtitle" global="true"/> + <!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set, + then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. --> + <!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.gif" global="true"/>--> + + <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> --> + <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> --> + <!-- TODO: Use transform to specify component URI --> + <set field="layoutSettings.companyName" from-field="uiLabelMap.BirtCompanyName" global="true"/> + <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.BirtCompanySubtitle" global="true"/> + <set field="activeApp" value="birt" global="true"/> + <set field="applicationMenuName" value="BirtAppBar" global="true"/> + <set field="applicationMenuLocation" value="component://birt/widget/Menus.xml" global="true"/> + <set field="applicationTitle" value="${uiLabelMap.BirtApplication}" global="true"/> + </actions> + <widgets> + <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/> + </widgets> + </section> + </screen> + + <screen name="CommonBirtDecorator"> + <section> + <actions> + <set field="headerItem" value="main"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <!-- do check for WEBTOOLS, _VIEW permission --> + <condition> + <if-has-permission permission="ENTITY_MAINT"/> + </condition> + <widgets> + <include-menu name="BirtTabBar" location="component://birt/widget/Menus.xml"/> + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <label style="h3">${uiLabelMap.WebtoolsPermissionError}</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> +</screens> Propchange: ofbiz/branches/addbirt/framework/birt/widget/CommonScreens.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/addbirt/framework/birt/widget/CommonScreens.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/branches/addbirt/framework/birt/widget/CommonScreens.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: ofbiz/branches/addbirt/framework/birt/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/widget/Menus.xml?rev=831503&view=auto ============================================================================== --- ofbiz/branches/addbirt/framework/birt/widget/Menus.xml (added) +++ ofbiz/branches/addbirt/framework/birt/widget/Menus.xml Sat Oct 31 01:22:47 2009 @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd"> + + <menu name="BirtAppBar" title="${uiLabelMap.FrameworkBirt}" extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + </menu> + + <menu name="BirtTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"> + <menu-item name="Viewer" title="${uiLabelMap.BirtViewer}"><link target="Viewer"/></menu-item> + <menu-item name="Report" title="${uiLabelMap.BirtReport}"><link target="Report"/></menu-item> + <menu-item name="Mail" title="${uiLabelMap.BirtMail}"><link target="Mail"/></menu-item> + <menu-item name="Export" title="${uiLabelMap.BirtViewHandler}"><link target="ViewHandler"/></menu-item> + </menu> +</menus> Propchange: ofbiz/branches/addbirt/framework/birt/widget/Menus.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/addbirt/framework/birt/widget/Menus.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/branches/addbirt/framework/birt/widget/Menus.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/branches/addbirt/framework/build.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/build.xml?rev=831503&r1=831502&r2=831503&view=diff ============================================================================== --- ofbiz/branches/addbirt/framework/build.xml (original) +++ ofbiz/branches/addbirt/framework/build.xml Sat Oct 31 01:22:47 2009 @@ -31,7 +31,7 @@ webapp/build.xml,guiapp/build.xml,widget/build.xml, common/build.xml, testtools/build.xml, - appserver/build.xml,webtools/build.xml,example/build.xml"/> + appserver/build.xml,webtools/build.xml,example/build.xml,birt/build.xml"/> <filelist id="test-builds" dir="." files="base/build.xml,entity/build.xml"/> Modified: ofbiz/branches/addbirt/framework/component-load.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/component-load.xml?rev=831503&r1=831502&r2=831503&view=diff ============================================================================== --- ofbiz/branches/addbirt/framework/component-load.xml (original) +++ ofbiz/branches/addbirt/framework/component-load.xml Sat Oct 31 01:22:47 2009 @@ -31,6 +31,7 @@ <load-component component-location="service"/> <load-component component-location="entityext"/> <load-component component-location="bi"/> + <load-component component-location="birt"/> <load-component component-location="webapp"/> <load-component component-location="guiapp"/> <load-component component-location="widget"/> Modified: ofbiz/branches/addbirt/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?rev=831503&r1=831502&r2=831503&view=diff ============================================================================== --- ofbiz/branches/addbirt/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original) +++ ofbiz/branches/addbirt/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Sat Oct 31 01:22:47 2009 @@ -48,6 +48,9 @@ import org.ofbiz.webapp.stats.ServerHitBin; import org.ofbiz.webapp.stats.VisitHandler; +import freemarker.ext.beans.BeansWrapper; +import freemarker.ext.servlet.ServletContextHashModel; + /** * ControlServlet.java - Master servlet for the web application. */ @@ -191,6 +194,9 @@ request.setAttribute("security", security); request.setAttribute("_REQUEST_HANDLER_", requestHandler); + + ServletContextHashModel ftlServletContext = new ServletContextHashModel(this, BeansWrapper.getDefaultInstance()); + request.setAttribute("ftlServletContext", ftlServletContext); // setup some things that should always be there UtilHttp.setInitialRequestInfo(request); Modified: ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java?rev=831503&r1=831502&r2=831503&view=diff ============================================================================== --- ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java (original) +++ ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/ScreenRenderer.java Sat Oct 31 01:22:47 2009 @@ -62,6 +62,7 @@ import freemarker.ext.jsp.TaglibFactory; import freemarker.ext.servlet.HttpRequestHashModel; import freemarker.ext.servlet.HttpSessionHashModel; +import freemarker.ext.servlet.ServletContextHashModel; /** * Widget Library - Screen model class @@ -242,6 +243,10 @@ TaglibFactory JspTaglibs = new TaglibFactory(servletContext); context.put("JspTaglibs", JspTaglibs); context.put("requestParameters", UtilHttp.getParameterMap(request)); + + ServletContextHashModel ftlServletContext = (ServletContextHashModel) request.getAttribute("ftlServletContext"); + context.put("Application", ftlServletContext); + context.put("Request", context.get("requestAttributes")); // this is a dummy object to stand-in for the JPublish page object for backward compatibility context.put("page", FastMap.newInstance()); Propchange: ofbiz/branches/addbirt/runtime/logs/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Sat Oct 31 01:22:47 2009 @@ -7,3 +7,4 @@ error.log* console.log* fop.log +ReportEngine* Propchange: ofbiz/branches/addbirt/runtime/tempfiles/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Sat Oct 31 01:22:47 2009 @@ -1,2 +1,6 @@ captcha docbook.css +*.app +org.ofbiz.eclipse.* +documents +org.eclipse.* |
Free forum by Nabble | Edit this page |