This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/trunk by this push:
new 12a1c4286 Added: ListExampleExportXlsx and ExampleReportXlsx demo
view-maps for the new screenxlsx handler (OFBIZ-13567)
12a1c4286 is described below
commit 12a1c428646b7a8262b6bb08e7ca7f721bb4b6f7
Author: Mridul Pathak <[email protected]>
AuthorDate: Tue Sep 8 16:56:00 2026 +0530
Added: ListExampleExportXlsx and ExampleReportXlsx demo view-maps for the
new screenxlsx handler (OFBIZ-13567)
- Adds two demo view-maps pointing the example plugin's existing
ListExampleExport and ExampleReport screens at the new screenxlsx view-handler
type, alongside their existing screenxls-based counterparts
- Proves out framework's new real .xlsx export mechanism end-to-end,
producing real, correctly-typed workbooks with the correct content type and
filename
- Adds matching UI entry points alongside the existing Xls links: a "View
as spreadsheet (.xlsx)" button-bar link next to ExampleReportXls's, and a
matching export button on the ListExampleExport search form next to its
existing Export button
---
example/webapp/example/WEB-INF/controller.xml | 4 ++++
example/widget/example/CommonScreens.xml | 3 +++
example/widget/example/ExampleForms.xml | 4 ++++
3 files changed, 11 insertions(+)
diff --git a/example/webapp/example/WEB-INF/controller.xml
b/example/webapp/example/WEB-INF/controller.xml
index 219128852..aa02c8ca6 100644
--- a/example/webapp/example/WEB-INF/controller.xml
+++ b/example/webapp/example/WEB-INF/controller.xml
@@ -52,6 +52,8 @@ under the License.
<request-map uri="ExampleReportXls"><security https="true"
auth="true"/><response name="success" type="view"
value="ExampleReportXls"/></request-map>
<request-map uri="ExampleReportPdf"><security https="true"
auth="true"/><response name="success" type="view"
value="ExampleReportPdf"/></request-map>
<request-map uri="ListExampleExport"><security https="true"
auth="true"/><response name="success" type="view"
value="ListExampleExport"/></request-map>
+ <request-map uri="ListExampleExportXlsx"><security https="true"
auth="true"/><response name="success" type="view"
value="ListExampleExportXlsx"/></request-map>
+ <request-map uri="ExampleReportXlsx"><security https="true"
auth="true"/><response name="success" type="view"
value="ExampleReportXlsx"/></request-map>
<request-map uri="createExample">
<security https="true" auth="true"/>
<event type="service" invoke="createExample"/>
@@ -266,8 +268,10 @@ under the License.
<view-map name="EditExampleItems" type="screen"
page="component://example/widget/example/ExampleScreens.xml#EditExampleItems"/>
<view-map name="EditExampleFeatureAppls" type="screen"
page="component://example/widget/example/ExampleScreens.xml#EditExampleFeatureAppls"/>
<view-map name="ListExampleExport" type="screenxls"
page="component://example/widget/example/ExampleScreens.xml#ListExampleExport"
content-type="application/vnd.ms-excel"/>
+ <view-map name="ListExampleExportXlsx" type="screenxlsx"
page="component://example/widget/example/ExampleScreens.xml#ListExampleExport"
content-type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
<view-map name="ExampleReportHtml" type="screen"
page="component://example/widget/example/ExampleScreens.xml#ExampleReport"/>
<view-map name="ExampleReportXls" type="screenxls"
page="component://example/widget/example/ExampleScreens.xml#ExampleReport"
content-type="application/vnd.ms-excel"/>
+ <view-map name="ExampleReportXlsx" type="screenxlsx"
page="component://example/widget/example/ExampleScreens.xml#ExampleReport"
content-type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
<view-map name="ExampleReportPdf" type="screenfop"
page="component://example/widget/example/ExampleScreens.xml#ExampleReport"
content-type="application/pdf" encoding="none"/>
<view-map name="ExampleReportPdfBarcode" type="screenfop"
page="component://example/widget/example/ExampleScreens.xml#ExampleReportPdfBarcode"
content-type="application/pdf" encoding="none"/>
diff --git a/example/widget/example/CommonScreens.xml
b/example/widget/example/CommonScreens.xml
index 132e632f2..15a9dcaf5 100644
--- a/example/widget/example/CommonScreens.xml
+++ b/example/widget/example/CommonScreens.xml
@@ -146,6 +146,9 @@ under the License.
<link target="ExampleReportXls"
text="${uiLabelMap.CommonViewAsXls}" style="buttontext">
<parameter
param-name="exampleId"/>
</link>
+ <link target="ExampleReportXlsx"
text="${uiLabelMap.CommonViewAsXlsx}" style="buttontext">
+ <parameter
param-name="exampleId"/>
+ </link>
<link target="ExampleReportPdf"
text="${uiLabelMap.CommonPdf}" style="buttontext" target-window="_blank">
<parameter
param-name="exampleId"/>
<image url-mode="raw"
src="${iconsLocation}/page_white_acrobat.png"/>
diff --git a/example/widget/example/ExampleForms.xml
b/example/widget/example/ExampleForms.xml
index b36de8faa..b4f2bb65c 100644
--- a/example/widget/example/ExampleForms.xml
+++ b/example/widget/example/ExampleForms.xml
@@ -52,6 +52,10 @@ under the License.
<hyperlink also-hidden="false" target-type="plain"
description="${uiLabelMap.CommonExport}"
target="javascript:
document.FindExamples.action='ListExampleExport';
document.FindExamples.submit();"/>
</field>
+ <field name="exportButtonXlsx" position="2" widget-style="smallSubmit"
title=" ">
+ <hyperlink also-hidden="false" target-type="plain"
description="${uiLabelMap.CommonViewAsXlsx}"
+ target="javascript:
document.FindExamples.action='ListExampleExportXlsx';
document.FindExamples.submit();"/>
+ </field>
</form>
<grid name="ListExamples" list-name="listIt" paginate-target="FindExample"
default-entity-name="Example" separate-columns="true"