Hi, I'm trying to extend the menu located in applications/accounting/widget/AgreementScreens.xml without touching this file. I created the following extension logic in my own file in commonext
<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> So I expected to see a new menu item "My menu-item" in AgreementTabBar. But this doesn't happen unless you replace the location for AgrrementTabBar in AgreementScreens.xml сб, 2 авг. 2025 г. в 09:08, Yashwant Dhakad < yashwant.dha...@hotwaxsystems.com>: > Hi Sergey, > > Have you tried adding the menu in your extended screen or your custom > decorator screen? We also need to include the menu in our screen, and this > way it will work. > > Here’s an example of how you can set the menu location in your screen: > > <set field="applicationMenuLocation" > value="component://commonext/widget/AccountingMenusExt.xml" > global="true"/> > > > On Fri, Aug 1, 2025 at 5:01 PM Sergey Nazaretyan <s.nazaret...@gmail.com> > wrote: > > > 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 > > > > > -- > Kind Regards, > Yashwant Dhakad > > HotWax Systems | www.hotwaxsystems.com > -- Sergey