In large applications, menus serve as the system entry point, while pages implement specific features.
However, Moqui’s current default behavior tightly binds the two — menus are dynamically generated from Screen XML subscreens.
This creates several issues:
Any Screen XML parsing error in any component can break the entire menu
Menu maintenance becomes tightly dependent on component structure
Permissions, ordering, icons, and i18n are scattered and inconsistent
Hard to extend and hard to manage in large systems
Core Idea: Fully Decouple Menus from Pages
By introducing a metadata-driven Menu Registry, we achieve:
Menus become an independent data source
Pages are just pages — their structure no longer affects menus
No more “menu disappears due to an XML error”
Unified permissions, ordering, icons, and internationalization
Each component can define its own menu without subscreens
The New Three-Layer Architecture
UI Layer (Vue/Quasar)
↓
Menu Service Layer (MenuData API)
↓
Menu Registry (XML configuration)
Menu Registry – controls what the menu looks like
Menu Service – provides stable JSON to the frontend
Screen Pages – keep only functional logic, fully independent from menus
Key Benefits
1) 100% Error Isolation
Screen XML broken? Component not found? Permission error?
Menus still load normally.
No more global navigation failures.
2) Maintenance Becomes Simple
Menus are centrally managed — no need to modify subscreens or page structure.
3) Significant Scalability
- Centralized multilingual support
- Centralized icons, descriptions, ordering
- Any component can register its own menu with a simple XML block
4) Fully Backward-Compatible
Works with all existing Screens without any modifications.
Implementation Highlights (Simplified)
- Add:
menu-registry-schema.xml - Add: Menu service
get MenuData - Update: qapps.xml
menuDatalogic to load menu registry first - Add: Multi-level fallback logic ensuring the navigation never fails
Verification Completed
Menu stability under page XML errors
Component-level menu testing
Performance testing (avg <200ms)
Stress & concurrency testing
Menu system health-check API
Conclusion
This architecture resolves Moqui’s long-standing menu–page coupling issue and delivers:
“Menu = stable system entry point (independent)”
“Page = functional implementation (isolated)”
Feedback, suggestions, and collaboration from the community are welcome.
If you need sample files or implementation references, I can provide them.