This is an automated email from the ASF dual-hosted git repository.
nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new e0c0a4d074 Improved: Add CommonDynamicMulti generic form on the
theming engine (OFBIZ-12748)
e0c0a4d074 is described below
commit e0c0a4d074657243f3b1b810541b775a22d7a7f1
Author: Nicolas Malin <[email protected]>
AuthorDate: Tue Jan 24 11:03:31 2023 +0100
Improved: Add CommonDynamicMulti generic form on the theming engine
(OFBIZ-12748)
To manage the multi form on the theming engine we added a new generic form
CommonDynamicMulti to help the theme to implement how rendering all them.
Example :
<form name="MyMultiForm" target=".." use-row-submit="true"
extends="CommonDynamicMulti"
extends-resource="component://common/widget/CommonForms.xml">
...
With this implementation, OFBiz can generate automatically the dynamic sort
, dynamic pagination and manage the presence of callback.
---
framework/common/widget/CommonForms.xml | 2 ++
themes/common-theme/widget/CommonForms.xml | 5 +++++
themes/common-theme/widget/Theme.xml | 1 +
3 files changed, 8 insertions(+)
diff --git a/framework/common/widget/CommonForms.xml
b/framework/common/widget/CommonForms.xml
index 22d4b8113b..ef17a7edfd 100644
--- a/framework/common/widget/CommonForms.xml
+++ b/framework/common/widget/CommonForms.xml
@@ -36,6 +36,8 @@ under the License.
commonFormLocations.CommonInLineEditList ?:
'component://common-theme/widget/CommonForms.xml'}"/>
<form name="CommonDynamicList" extends="CommonDynamicList"
extends-resource="${groovy:
commonFormLocations.CommonDynamicList ?:
'component://common-theme/widget/CommonForms.xml'}"/>
+ <form name="CommonDynamicMulti" extends="CommonDynamicMulti"
extends-resource="${groovy:
+ commonFormLocations.CommonDynamicMulti ?:
'component://common-theme/widget/CommonForms.xml'}"/>
<form name="CommonBasicSingle" extends="CommonBasicSingle"
extends-resource="${groovy:
commonFormLocations.CommonBasicSingle ?:
'component://common-theme/widget/CommonForms.xml'}"/>
diff --git a/themes/common-theme/widget/CommonForms.xml
b/themes/common-theme/widget/CommonForms.xml
index 361b0eb4b4..9478744611 100644
--- a/themes/common-theme/widget/CommonForms.xml
+++ b/themes/common-theme/widget/CommonForms.xml
@@ -40,6 +40,11 @@ under the License.
<on-event-update-area event-type="paginate"/>
<on-event-update-area event-type="submit"/>
</form>
+ <form name="CommonDynamicMulti" type="multi"
+ odd-row-style="alternate-row" default-table-style="basic-table
hover-bar" header-row-style="header-row-2">
+ <on-event-update-area event-type="sort-column"/>
+ <on-event-update-area event-type="paginate"/>
+ </form>
<form name="CommonInLineEditList" type="list"
default-table-style="basic-table hover-bar"
odd-row-style="alternate-row" header-row-style="header-row-2"
separate-columns="true"/>
diff --git a/themes/common-theme/widget/Theme.xml
b/themes/common-theme/widget/Theme.xml
index a4bdf2861d..ae41e94890 100644
--- a/themes/common-theme/widget/Theme.xml
+++ b/themes/common-theme/widget/Theme.xml
@@ -166,6 +166,7 @@ under the License.
<form name="CommonSimpleList"/>
<form name="CommonBasicList"/>
<form name="CommonDynamicList"/>
+ <form name="CommonDynamicMulti"/>
<form name="CommonInLineEditList"/>
<form name="CommonBasicSingle"/>
<form name="CommonDynamicSingle"/>