From cafa721fec154aff3b8d73cba09730de2dc721ab Mon Sep 17 00:00:00 2001 From: Bruno Busco Date: Sun, 20 Dec 2009 20:47:20 +0000 Subject: [PATCH] Added birt webapp in the example component. This was erroneusly omitted in previous commit. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@892658 13f79535-47bb-0310-9956-ffa450edef68 --- framework/birt/webapp/birt/WEB-INF/birt.tld | 1157 +++++++++++++++++ .../birt/webapp/birt/WEB-INF/controller.xml | 93 ++ .../webapp/birt/WEB-INF/server-config.wsdd | 952 ++++++++++++++ framework/birt/webapp/birt/WEB-INF/web.xml | 297 +++++ framework/birt/webapp/birt/birt/report.ftl | 30 + framework/birt/webapp/birt/error/error.jsp | 52 + framework/birt/webapp/birt/index.jsp | 19 + .../birt/webapp/birt/report/product.rptdesign | 212 +++ framework/example/ofbiz-component.xml | 7 + .../example/webapp/birt/WEB-INF/birt.tld | 1157 +++++++++++++++++ .../webapp/birt/WEB-INF/controller.xml | 93 ++ .../webapp/birt/WEB-INF/server-config.wsdd | 952 ++++++++++++++ framework/example/webapp/birt/WEB-INF/web.xml | 297 +++++ .../example/webapp/birt/{ => birt}/report.ftl | 0 framework/example/webapp/birt/error/error.jsp | 52 + framework/example/webapp/birt/index.jsp | 19 + .../example/widget/example/BirtScreens.xml | 2 +- 17 files changed, 5390 insertions(+), 1 deletion(-) create mode 100644 framework/birt/webapp/birt/WEB-INF/birt.tld create mode 100644 framework/birt/webapp/birt/WEB-INF/controller.xml create mode 100644 framework/birt/webapp/birt/WEB-INF/server-config.wsdd create mode 100644 framework/birt/webapp/birt/WEB-INF/web.xml create mode 100644 framework/birt/webapp/birt/birt/report.ftl create mode 100644 framework/birt/webapp/birt/error/error.jsp create mode 100644 framework/birt/webapp/birt/index.jsp create mode 100644 framework/birt/webapp/birt/report/product.rptdesign create mode 100644 framework/example/webapp/birt/WEB-INF/birt.tld create mode 100644 framework/example/webapp/birt/WEB-INF/controller.xml create mode 100644 framework/example/webapp/birt/WEB-INF/server-config.wsdd create mode 100644 framework/example/webapp/birt/WEB-INF/web.xml rename framework/example/webapp/birt/{ => birt}/report.ftl (100%) create mode 100644 framework/example/webapp/birt/error/error.jsp create mode 100644 framework/example/webapp/birt/index.jsp diff --git a/framework/birt/webapp/birt/WEB-INF/birt.tld b/framework/birt/webapp/birt/WEB-INF/birt.tld new file mode 100644 index 0000000000..72af70142f --- /dev/null +++ b/framework/birt/webapp/birt/WEB-INF/birt.tld @@ -0,0 +1,1157 @@ + + + + 1.0 + 1.2 + BIRT Tag Library + http://www.eclipse.org/birt/taglibs/birt.tld + + This Tag Library makes user develope JSP with BIRT Viewer component easily. + + + + + + + viewer + org.eclipse.birt.report.taglib.ViewerTag + JSP + + The viewer tag is to specify how to import and control BIRT Report Viewer into JSP page. + This tag will use Ajax framework to retrieve report content. + + + + id + true + true + + Specifies the current viewer id. It should be unique. + It can contain number,letter or underline. + + + + + pattern + false + true + + Specifies which servlet pattern to be used to preview report. + Default value is frameset. + ( frameset or run ) + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + + + + + title + false + true + + Specifies the report title displayed at the top. + + + + + isHostPage + false + true + + Specifies whether the viewer occupies the whole page. + Default to false. + + + + + scrolling + false + true + + Sets the IFrame style "scrolling ". + If isHostPage is true, ignore this attribute. + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of report container. + If isHostPage is true, ignore this attribute. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of report container. + If isHostPage is true, ignore this attribute. + + + + + height + false + true + + Sets the height of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + width + false + true + + Sets the width of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + top + false + true + + Sets the top of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + left + false + true + + Sets the left of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Default to no. + If isHostPage is true, ignore this attribute. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + Noted: frameset pattern doesn't support reportlet. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + pageNum + false + true + + Specifies output page number when render document file. + + + + + pageRange + false + true + + Specifies page range when render document file. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + forceOverwriteDocument + false + true + + Specifies whether forces to overwrite the generated document. + If allowPageBreak is false,ignore this attribute. + Default value is defined in web.xml. + + + + + showTitle + false + true + + Specifies whether shows the report title. + Default to true. + + + + + showToolBar + false + true + + Specifies whether shows the toolbar. + Default to true. + + + + + showNavigationBar + false + true + + Specifies whether shows the Navigation Bar. + If allowPageBreak is false,ignore this attribute. + Default to true. + + + + + showParameterPage + false + true + + Specifies whether show the parameter dialog or not. + Default to true. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + report + org.eclipse.birt.report.taglib.ReportTag + JSP + + The report tag can provide fast report preview without Ajax framework. + The report content can be output to web browser directly. + + + + id + true + true + + Specifies the current viewer id. It should be unique. + It can contain number,letter or underline. + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + If report container is DIV, ignore this attribute. + + + + + isHostPage + false + true + + Specifies whether the viewer occupies the whole page. + Default to false. + + + + + scrolling + false + true + + Sets the DIV/IFrame style "scrolling ". + If isHostPage is true, ignore this attribute. + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of report container. + If isHostPage is true, ignore this attribute. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of report container. + If isHostPage is true, ignore this attribute. + + + + + height + false + true + + Sets the height of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + width + false + true + + Sets the width of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + top + false + true + + Sets the top of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + left + false + true + + Sets the left of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Available when user IFrame. + Default to no. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + showParameterPage + false + true + + Specifies whether show the parameter dialog or not. + Default to true. + If report container is DIV, ignore this attribute. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + reportContainer + false + true + + Specifies iframe or div as report container. + Default to iframe. + ( iframe | div ) + + + + + pageNum + false + true + + Specifies output page number when render document file. + + + + + pageRange + false + true + + Specifies page range when render document file. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + param + org.eclipse.birt.report.taglib.ParamTag + JSP + + The param tag specifies the parameters defined in report design file. + + + name + true + true + + Specifies the report parameter name. + + + + pattern + false + true + + Specifies the report parameter pattern format. + + + + value + false + true + + Specifies the report parameter value. If doesn't set, value is null. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + delim + false + true + + Specifies the delimiter for multiple values. + Defaults to pipe "|". + + + + isLocale + false + true + + Specifies whether the report parameter value is a locale/format related string. + + + + + + + + + value + org.eclipse.birt.report.taglib.ParamValueTag + JSP + + The param value tag specifies multiple values for a given param tag. + + + value + false + true + + Specifies the report parameter value. If doesn't set, value is null. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + + + + + + parameterPage + org.eclipse.birt.report.taglib.RequesterTag + JSP + + The parameterPage tag can help developers to display BIRT parameter page or create a user-defined parameter page. + This tag can collect these parameters and submit to BIRT servlet to handle request. + + + + id + true + true + + Specifies the parameter page id.It should be unique. + It can contain number,letter or underline. + + + + + name + false + true + + Specifies the parameter page name. + If attribute 'isCustom' is true, this name should be required and unique. + + + + + isCustom + false + true + + Specifies whether uses the user-defined parameter page. + If false, use the BIRT parameter dialog. + Default to false. + + + + + title + false + true + + Specifies the report title displayed at the top. + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + + + + + scrolling + false + true + + Sets the DIV/IFrame style "scrolling ". + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of parameter page. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of parameter page. + + + + + height + false + true + + Sets the height of parameter page in pixels. + + + + + width + false + true + + Sets the width of parameter page in pixels. + + + + + top + false + true + + Sets the top of parameter page in pixels. + + + + + left + false + true + + Sets the left of parameter page in pixels. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Default to no. + If set "isCustom" to true, ignore this attribute. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + Noted: frameset pattern doesn't support reportlet. + + + + + pattern + false + true + + Specifies the servlet pattern for request submit. + BIRT supports three patterns: frameset, run and preview. + Can refer to the user-defined servlet pattern. + Default to frameset. + + + + + target + false + true + + Specifies the target window for request submit. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + forceOverwriteDocument + false + true + + Specifies whether forces to overwrite the generated document. + If allowPageBreak is false,ignore this attribute. + Default value is defined in web.xml. + + + + + showTitle + false + true + + Specifies whether shows the report title. + Default to true. + + + + + showToolBar + false + true + + Specifies whether shows the toolbar. + Default to true. + + + + + showNavigationBar + false + true + + Specifies whether shows the Navigation Bar. + If allowPageBreak is false,ignore this attribute. + Default to true. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + paramDef + org.eclipse.birt.report.taglib.ParamDefTag + JSP + + The param tag is used to generate html code for defined parameter in ParameterPage tag. + + + id + true + true + + Specifies the id of parameter control.It should be unique. + It can contain number,letter or underline. + + + + name + true + true + + Specifies the report parameter name. + + + + pattern + false + true + + Specifies the report parameter pattern format. + It is used to parse defined parameter value string. + + + + value + false + true + + Specifies the report parameter value. If doesn't set, use default value. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + isLocale + false + true + + Specifies whether the report parameter value is a locale/format related string. + It is used to parse defined parameter value string. + + + + title + false + true + + Specifies the title attribute of parameter control. + + + + cssClass + false + true + + Specifies the css class attribute of parameter control. + + + + style + false + true + + Specifies the parameter control style. + + + + \ No newline at end of file diff --git a/framework/birt/webapp/birt/WEB-INF/controller.xml b/framework/birt/webapp/birt/WEB-INF/controller.xml new file mode 100644 index 0000000000..7123b933b7 --- /dev/null +++ b/framework/birt/webapp/birt/WEB-INF/controller.xml @@ -0,0 +1,93 @@ + + + + + + + + + Birt Component Site Configuration File + Copyright 2001-2008 The Apache Software Foundation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/birt/webapp/birt/WEB-INF/server-config.wsdd b/framework/birt/webapp/birt/WEB-INF/server-config.wsdd new file mode 100644 index 0000000000..fe9a342872 --- /dev/null +++ b/framework/birt/webapp/birt/WEB-INF/server-config.wsdd @@ -0,0 +1,952 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://schemas.eclipse.org/birt + + + + + + + http://xml.apache.org/axis/wsdd/ + + + + + + + + + + + + + + + + + + + + diff --git a/framework/birt/webapp/birt/WEB-INF/web.xml b/framework/birt/webapp/birt/WEB-INF/web.xml new file mode 100644 index 0000000000..c5e25f1f2a --- /dev/null +++ b/framework/birt/webapp/birt/WEB-INF/web.xml @@ -0,0 +1,297 @@ + + + + + + Open For Business - BIRT Component + BIRT Component of the Open For Business Project + + + webSiteId + BIRT + A unique ID used to look up the WebSite entity + + + localDispatcherNamebirt + A unique name used to identify/recognize the local dispatcher for the Service Engine + + + entityDelegatorNamedefault + The Name of the Entity Delegator to use, defined in entityengine.xml + + + mainDecoratorLocation + component://birt/widget/CommonScreens.xml + The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files. + + + widgetVerbose + false + Enable widget boundary comments. See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled(). + + + compressHTML + false + Remove unnecessary whitespace from HTML output. + + + + + BIRT_VIEWER_LOCALE + en-US + + + + + BIRT_VIEWER_TIMEZONE + + + + + + BIRT_VIEWER_WORKING_FOLDER + ${ofbiz.home}/runtime/tempfiles + + + + + BIRT_VIEWER_DOCUMENT_FOLDER + ${ofbiz.home}/runtime/tempfiles/documents + + + + + WORKING_FOLDER_ACCESS_ONLY + true + + + + + BIRT_VIEWER_IMAGE_DIR + ${ofbiz.home}/runtime/tempfiles/images + + + + + BIRT_VIEWER_LOG_DIR + ${ofbiz.home}/runtime/logs + + + + + BIRT_VIEWER_LOG_LEVEL + WARNING + + + + + BIRT_VIEWER_SCRIPTLIB_DIR + ${ofbiz.home}/framework/birt/lib/scriptlib + + + + + BIRT_RESOURCE_PATH + ${ofbiz.home}/runtime/tempfiles + + + + + BIRT_VIEWER_MAX_ROWS + + + + + + BIRT_VIEWER_MAX_CUBE_ROWLEVELS + + + + BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS + + + + + + BIRT_VIEWER_CUBE_MEMORY_SIZE + + + + + + BIRT_VIEWER_CONFIG_FILE + WEB-INF/viewer.properties + + + + + BIRT_VIEWER_PRINT_SERVERSIDE + ON + + + + + HTML_ENABLE_AGENTSTYLE_ENGINE + true + + + + + BIRT_FILENAME_GENERATOR_CLASS + org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator + + + + ContextFilter + ContextFilter + org.ofbiz.webapp.control.ContextFilter + disableContextSecurityN + + allowedPaths + /control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css:/frameset:/run:/preview:/download:/parameter:/document:/output:/extract:/webcontent:/CancelTask.jsp + + errorCode403 + redirectPath/control/main + + + + ViewerFilter + org.eclipse.birt.report.filter.ViewerFilter + + + ContextFilter/* + + ViewerFilter + ViewerServlet + + + ViewerFilter + EngineServlet + + + org.ofbiz.webapp.control.ControlEventListener + org.ofbiz.webapp.control.LoginEventListener + + + + + + org.eclipse.birt.report.listener.ViewerHttpSessionListener + + + + ControlServlet + ControlServlet + Main Control Servlet + org.ofbiz.webapp.control.ControlServlet + 1 + + + + + + EngineServlet + org.ofbiz.birt.report.servlet.BirtEngineServlet + + ControlServlet/control/* + + + + + EngineServlet + /preview + + + + EngineServlet + /download + + + + EngineServlet + /parameter + + + + EngineServlet + /document + + + + EngineServlet + /output + + + + EngineServlet + /extract + + + 60 + + + index.jsp + index.html + index.htm + + diff --git a/framework/birt/webapp/birt/birt/report.ftl b/framework/birt/webapp/birt/birt/report.ftl new file mode 100644 index 0000000000..2ec8b1f512 --- /dev/null +++ b/framework/birt/webapp/birt/birt/report.ftl @@ -0,0 +1,30 @@ +<#-- +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. +--> + +<#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/> + +<@birt.report id="birtReport" + reportDesign="component://birt/webapp/birt/report/product.rptdesign" + baseURL="/birt" + height="700" + width="900" + format="html" + isHostPage="false" + pageNum="2"> + \ No newline at end of file diff --git a/framework/birt/webapp/birt/error/error.jsp b/framework/birt/webapp/birt/error/error.jsp new file mode 100644 index 0000000000..522a2387df --- /dev/null +++ b/framework/birt/webapp/birt/error/error.jsp @@ -0,0 +1,52 @@ +<%-- +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. +--%> +<%@ page import="org.ofbiz.base.util.*" %> + + +Open For Business Message + + + +<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %> + + +
+
+ + + + +
+ + + + + + + +
+
:ERROR MESSAGE:
+
+
<%=UtilFormatOut.replaceString(errorMsg, "\n", "
")%>
+
+
+
+
+ + diff --git a/framework/birt/webapp/birt/index.jsp b/framework/birt/webapp/birt/index.jsp new file mode 100644 index 0000000000..9d916ea0ed --- /dev/null +++ b/framework/birt/webapp/birt/index.jsp @@ -0,0 +1,19 @@ +<%-- +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. +--%> +<%response.sendRedirect("control/main");%> diff --git a/framework/birt/webapp/birt/report/product.rptdesign b/framework/birt/webapp/birt/report/product.rptdesign new file mode 100644 index 0000000000..672e4a9182 --- /dev/null +++ b/framework/birt/webapp/birt/report/product.rptdesign @@ -0,0 +1,212 @@ + + + Eclipse BIRT Designer Version 2.5.1.v20090903 Build <2.5.1.v20090917-1447> + in + + /templates/blank_report.gif + ltr + + + + + + + + 0 + productId + string + + + 1 + productTypeId + string + + + 2 + internalName + string + + + + + productId + productId + + + productTypeId + productTypeId + + + internalName + internalName + + + + + + 1 + productId + string + + + 2 + productTypeId + string + + + 3 + internalName + string + + + + OFBiz + + + + + + + + + + + + + + html + new Date()]]> + + + + + + + Product + + + productId + productId + dataSetRow["productId"] + string + + + productTypeId + productTypeId + dataSetRow["productTypeId"] + string + + + internalName + internalName + dataSetRow["internalName"] + string + + + + + +
+ + #BFBFBF + bold + center + + + + + + + + + + +
+ + + + + productId + + + + + productTypeId + + + + + internalName + + + + +
+ + + + + +
+
+ +
diff --git a/framework/example/ofbiz-component.xml b/framework/example/ofbiz-component.xml index e26c85fa16..eac49cbd93 100644 --- a/framework/example/ofbiz-component.xml +++ b/framework/example/ofbiz-component.xml @@ -58,4 +58,11 @@ under the License. location="webapp/example" base-permission="OFBTOOLS,EXAMPLE" mount-point="/example"/> + + diff --git a/framework/example/webapp/birt/WEB-INF/birt.tld b/framework/example/webapp/birt/WEB-INF/birt.tld new file mode 100644 index 0000000000..72af70142f --- /dev/null +++ b/framework/example/webapp/birt/WEB-INF/birt.tld @@ -0,0 +1,1157 @@ + + + + 1.0 + 1.2 + BIRT Tag Library + http://www.eclipse.org/birt/taglibs/birt.tld + + This Tag Library makes user develope JSP with BIRT Viewer component easily. + + + + + + + viewer + org.eclipse.birt.report.taglib.ViewerTag + JSP + + The viewer tag is to specify how to import and control BIRT Report Viewer into JSP page. + This tag will use Ajax framework to retrieve report content. + + + + id + true + true + + Specifies the current viewer id. It should be unique. + It can contain number,letter or underline. + + + + + pattern + false + true + + Specifies which servlet pattern to be used to preview report. + Default value is frameset. + ( frameset or run ) + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + + + + + title + false + true + + Specifies the report title displayed at the top. + + + + + isHostPage + false + true + + Specifies whether the viewer occupies the whole page. + Default to false. + + + + + scrolling + false + true + + Sets the IFrame style "scrolling ". + If isHostPage is true, ignore this attribute. + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of report container. + If isHostPage is true, ignore this attribute. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of report container. + If isHostPage is true, ignore this attribute. + + + + + height + false + true + + Sets the height of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + width + false + true + + Sets the width of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + top + false + true + + Sets the top of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + left + false + true + + Sets the left of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Default to no. + If isHostPage is true, ignore this attribute. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + Noted: frameset pattern doesn't support reportlet. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + pageNum + false + true + + Specifies output page number when render document file. + + + + + pageRange + false + true + + Specifies page range when render document file. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + forceOverwriteDocument + false + true + + Specifies whether forces to overwrite the generated document. + If allowPageBreak is false,ignore this attribute. + Default value is defined in web.xml. + + + + + showTitle + false + true + + Specifies whether shows the report title. + Default to true. + + + + + showToolBar + false + true + + Specifies whether shows the toolbar. + Default to true. + + + + + showNavigationBar + false + true + + Specifies whether shows the Navigation Bar. + If allowPageBreak is false,ignore this attribute. + Default to true. + + + + + showParameterPage + false + true + + Specifies whether show the parameter dialog or not. + Default to true. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + report + org.eclipse.birt.report.taglib.ReportTag + JSP + + The report tag can provide fast report preview without Ajax framework. + The report content can be output to web browser directly. + + + + id + true + true + + Specifies the current viewer id. It should be unique. + It can contain number,letter or underline. + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + If report container is DIV, ignore this attribute. + + + + + isHostPage + false + true + + Specifies whether the viewer occupies the whole page. + Default to false. + + + + + scrolling + false + true + + Sets the DIV/IFrame style "scrolling ". + If isHostPage is true, ignore this attribute. + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of report container. + If isHostPage is true, ignore this attribute. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of report container. + If isHostPage is true, ignore this attribute. + + + + + height + false + true + + Sets the height of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + width + false + true + + Sets the width of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + top + false + true + + Sets the top of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + left + false + true + + Sets the left of report container in pixels. + If isHostPage is true, ignore this attribute. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Available when user IFrame. + Default to no. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + showParameterPage + false + true + + Specifies whether show the parameter dialog or not. + Default to true. + If report container is DIV, ignore this attribute. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + reportContainer + false + true + + Specifies iframe or div as report container. + Default to iframe. + ( iframe | div ) + + + + + pageNum + false + true + + Specifies output page number when render document file. + + + + + pageRange + false + true + + Specifies page range when render document file. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + param + org.eclipse.birt.report.taglib.ParamTag + JSP + + The param tag specifies the parameters defined in report design file. + + + name + true + true + + Specifies the report parameter name. + + + + pattern + false + true + + Specifies the report parameter pattern format. + + + + value + false + true + + Specifies the report parameter value. If doesn't set, value is null. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + delim + false + true + + Specifies the delimiter for multiple values. + Defaults to pipe "|". + + + + isLocale + false + true + + Specifies whether the report parameter value is a locale/format related string. + + + + + + + + + value + org.eclipse.birt.report.taglib.ParamValueTag + JSP + + The param value tag specifies multiple values for a given param tag. + + + value + false + true + + Specifies the report parameter value. If doesn't set, value is null. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + + + + + + parameterPage + org.eclipse.birt.report.taglib.RequesterTag + JSP + + The parameterPage tag can help developers to display BIRT parameter page or create a user-defined parameter page. + This tag can collect these parameters and submit to BIRT servlet to handle request. + + + + id + true + true + + Specifies the parameter page id.It should be unique. + It can contain number,letter or underline. + + + + + name + false + true + + Specifies the parameter page name. + If attribute 'isCustom' is true, this name should be required and unique. + + + + + isCustom + false + true + + Specifies whether uses the user-defined parameter page. + If false, use the BIRT parameter dialog. + Default to false. + + + + + title + false + true + + Specifies the report title displayed at the top. + + + + + baseURL + false + true + + Specifies base URL of BIRT viewer. + Default to the current context. + + + + + scrolling + false + true + + Sets the DIV/IFrame style "scrolling ". + ( auto | yes | no ) + + + + + position + false + true + + Sets the style "position" of parameter page. + ( static | absolute | fixed | relative ) + + + + + style + false + true + + Sets the style of parameter page. + + + + + height + false + true + + Sets the height of parameter page in pixels. + + + + + width + false + true + + Sets the width of parameter page in pixels. + + + + + top + false + true + + Sets the top of parameter page in pixels. + + + + + left + false + true + + Sets the left of parameter page in pixels. + + + + + frameborder + false + true + + Specifies whether displays the iframe border. + Default to no. + If set "isCustom" to true, ignore this attribute. + ( Yes | No ) + + + + + reportDesign + false + true + + Specifies the report design file name. + ( Absolute path, relative path or URL ) + + + + + reportDocument + false + true + + Specifies the report document file name. + Noted: only support "file:" URL format. + ( Absolute path, relative path or URL ) + + + + + reportletId + false + true + + Specifies the instance id of reportlet. + The "reportDocument" attribute should be required. + Noted: frameset pattern doesn't support reportlet. + + + + + pattern + false + true + + Specifies the servlet pattern for request submit. + BIRT supports three patterns: frameset, run and preview. + Can refer to the user-defined servlet pattern. + Default to frameset. + + + + + target + false + true + + Specifies the target window for request submit. + + + + + bookmark + false + true + + Specifies the targeted bookmark name. + + + + + locale + false + true + + Specifies the Locale information. + + + + + timeZone + false + true + + Specifies a time zone id. For example: "America/Los_Angeles" or "GMT+1" or "GMT+01:00". + + + + + svg + false + true + + Specifies whether supports the SVG output format or not. + + + + + format + false + true + + Specifies the output format of report. + + + + + emitterId + false + true + + Specifies the emitter id for the report output. + + + + + pageOverflow + false + true + + Specifies the page overflow setting for the PDF format. + One of the following values: + 0 for "auto", 1 for "actual size", 2 for "fit to page". + + + + + rtl + false + true + + Specifies whether supports rtl page or not. + + + + + resourceFolder + false + true + + Specifies the referenced resource folder. + Default value is defined in web.xml. + + + + + forceOverwriteDocument + false + true + + Specifies whether forces to overwrite the generated document. + If allowPageBreak is false,ignore this attribute. + Default value is defined in web.xml. + + + + + showTitle + false + true + + Specifies whether shows the report title. + Default to true. + + + + + showToolBar + false + true + + Specifies whether shows the toolbar. + Default to true. + + + + + showNavigationBar + false + true + + Specifies whether shows the Navigation Bar. + If allowPageBreak is false,ignore this attribute. + Default to true. + + + + + isReportlet + false + true + + Specifies whether render reportlet by bookmark. + Default to false. + + + + + + + + + + paramDef + org.eclipse.birt.report.taglib.ParamDefTag + JSP + + The param tag is used to generate html code for defined parameter in ParameterPage tag. + + + id + true + true + + Specifies the id of parameter control.It should be unique. + It can contain number,letter or underline. + + + + name + true + true + + Specifies the report parameter name. + + + + pattern + false + true + + Specifies the report parameter pattern format. + It is used to parse defined parameter value string. + + + + value + false + true + + Specifies the report parameter value. If doesn't set, use default value. + + + + displayText + false + true + + Specifies the report parameter display text. + + + + isLocale + false + true + + Specifies whether the report parameter value is a locale/format related string. + It is used to parse defined parameter value string. + + + + title + false + true + + Specifies the title attribute of parameter control. + + + + cssClass + false + true + + Specifies the css class attribute of parameter control. + + + + style + false + true + + Specifies the parameter control style. + + + + \ No newline at end of file diff --git a/framework/example/webapp/birt/WEB-INF/controller.xml b/framework/example/webapp/birt/WEB-INF/controller.xml new file mode 100644 index 0000000000..cb8d05b6a8 --- /dev/null +++ b/framework/example/webapp/birt/WEB-INF/controller.xml @@ -0,0 +1,93 @@ + + + + + + + + + Birt Component Site Configuration File + Copyright 2001-2008 The Apache Software Foundation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/example/webapp/birt/WEB-INF/server-config.wsdd b/framework/example/webapp/birt/WEB-INF/server-config.wsdd new file mode 100644 index 0000000000..fe9a342872 --- /dev/null +++ b/framework/example/webapp/birt/WEB-INF/server-config.wsdd @@ -0,0 +1,952 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://schemas.eclipse.org/birt + + + + + + + http://xml.apache.org/axis/wsdd/ + + + + + + + + + + + + + + + + + + + + diff --git a/framework/example/webapp/birt/WEB-INF/web.xml b/framework/example/webapp/birt/WEB-INF/web.xml new file mode 100644 index 0000000000..c86e5525f8 --- /dev/null +++ b/framework/example/webapp/birt/WEB-INF/web.xml @@ -0,0 +1,297 @@ + + + + + + Open For Business - BIRT Component + BIRT Component of the Open For Business Project + + + webSiteId + BIRT + A unique ID used to look up the WebSite entity + + + localDispatcherNamebirt + A unique name used to identify/recognize the local dispatcher for the Service Engine + + + entityDelegatorNamedefault + The Name of the Entity Delegator to use, defined in entityengine.xml + + + mainDecoratorLocation + component://example/widget/example/CommonScreens.xml + The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files. + + + widgetVerbose + false + Enable widget boundary comments. See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled(). + + + compressHTML + false + Remove unnecessary whitespace from HTML output. + + + + + BIRT_VIEWER_LOCALE + en-US + + + + + BIRT_VIEWER_TIMEZONE + + + + + + BIRT_VIEWER_WORKING_FOLDER + ${ofbiz.home}/runtime/tempfiles + + + + + BIRT_VIEWER_DOCUMENT_FOLDER + ${ofbiz.home}/runtime/tempfiles/documents + + + + + WORKING_FOLDER_ACCESS_ONLY + true + + + + + BIRT_VIEWER_IMAGE_DIR + ${ofbiz.home}/runtime/tempfiles/images + + + + + BIRT_VIEWER_LOG_DIR + ${ofbiz.home}/runtime/logs + + + + + BIRT_VIEWER_LOG_LEVEL + WARNING + + + + + BIRT_VIEWER_SCRIPTLIB_DIR + ${ofbiz.home}/framework/birt/lib/scriptlib + + + + + BIRT_RESOURCE_PATH + ${ofbiz.home}/runtime/tempfiles + + + + + BIRT_VIEWER_MAX_ROWS + + + + + + BIRT_VIEWER_MAX_CUBE_ROWLEVELS + + + + BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS + + + + + + BIRT_VIEWER_CUBE_MEMORY_SIZE + + + + + + BIRT_VIEWER_CONFIG_FILE + WEB-INF/viewer.properties + + + + + BIRT_VIEWER_PRINT_SERVERSIDE + ON + + + + + HTML_ENABLE_AGENTSTYLE_ENGINE + true + + + + + BIRT_FILENAME_GENERATOR_CLASS + org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator + + + + ContextFilter + ContextFilter + org.ofbiz.webapp.control.ContextFilter + disableContextSecurityN + + allowedPaths + /control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css:/frameset:/run:/preview:/download:/parameter:/document:/output:/extract:/webcontent:/CancelTask.jsp + + errorCode403 + redirectPath/control/main + + + + ViewerFilter + org.eclipse.birt.report.filter.ViewerFilter + + + ContextFilter/* + + ViewerFilter + ViewerServlet + + + ViewerFilter + EngineServlet + + + org.ofbiz.webapp.control.ControlEventListener + org.ofbiz.webapp.control.LoginEventListener + + + + + + org.eclipse.birt.report.listener.ViewerHttpSessionListener + + + + ControlServlet + ControlServlet + Main Control Servlet + org.ofbiz.webapp.control.ControlServlet + 1 + + + + + + EngineServlet + org.ofbiz.birt.report.servlet.BirtEngineServlet + + ControlServlet/control/* + + + + + EngineServlet + /preview + + + + EngineServlet + /download + + + + EngineServlet + /parameter + + + + EngineServlet + /document + + + + EngineServlet + /output + + + + EngineServlet + /extract + + + 60 + + + index.jsp + index.html + index.htm + + diff --git a/framework/example/webapp/birt/report.ftl b/framework/example/webapp/birt/birt/report.ftl similarity index 100% rename from framework/example/webapp/birt/report.ftl rename to framework/example/webapp/birt/birt/report.ftl diff --git a/framework/example/webapp/birt/error/error.jsp b/framework/example/webapp/birt/error/error.jsp new file mode 100644 index 0000000000..522a2387df --- /dev/null +++ b/framework/example/webapp/birt/error/error.jsp @@ -0,0 +1,52 @@ +<%-- +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. +--%> +<%@ page import="org.ofbiz.base.util.*" %> + + +Open For Business Message + + + +<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %> + + +
+
+ + + + +
+ + + + + + + +
+
:ERROR MESSAGE:
+
+
<%=UtilFormatOut.replaceString(errorMsg, "\n", "
")%>
+
+
+
+
+ + diff --git a/framework/example/webapp/birt/index.jsp b/framework/example/webapp/birt/index.jsp new file mode 100644 index 0000000000..9d916ea0ed --- /dev/null +++ b/framework/example/webapp/birt/index.jsp @@ -0,0 +1,19 @@ +<%-- +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. +--%> +<%response.sendRedirect("control/main");%> diff --git a/framework/example/widget/example/BirtScreens.xml b/framework/example/widget/example/BirtScreens.xml index 4a74be1745..5395cfc63a 100644 --- a/framework/example/widget/example/BirtScreens.xml +++ b/framework/example/widget/example/BirtScreens.xml @@ -36,7 +36,7 @@ - +