Hello OFBiz Community,
I'm a senior developer exploring an OFBiz 18.12 system.
Trying to follow strict non-modification policies for core files, using
commonext for customizations. While i'm successfully extended services and
entities without touching core, facing challenges with UI extensions.
Context:
I'm trying to add a new menu item (MyAgreementMenuItem) to the existing
AgreementTabBar menu:
1.
Created custom file: commonext/widget/MyAccountingMenus.xml
2.
Used extends option:
<menu name="AgreementTabBar" extends="AgreementTabBar"
> extends-resource="component://accounting/widget/AccountingMenus.xml">
> <menu-item name="MyAgreementMenuItem" title="My menu-item">
> <link target="MyTarget">...</link>
> </menu-item> </menu>
>
>
Issue:
The new menu item doesn't appear unless we modify the core
AgreementScreens.xml:
> <!-- Works ONLY with modified location --> <include-menu
> name="AgreementTabBar"
> location="component://commonext/widget/MyAccountingMenus.xml"/>
>
>
Key Questions:
1.
Is it possible to extend UI without modifying core files and location
references?
2.
Why does this approach work for services/entities but not UI menus? if I
create a service description with the same name in commonext, it will be
replaced without changing the core files.
3.
Are there alternative patterns for menu extensions that preserve core
integrity?
Appreciate any insights into OFBiz's UI extension philosophy.
Happy to document our solution for others once resolved!
--
Sergey