Pete
Pete

Reputation: 81

SAPUI5 - reuse fragments across multiple applications

I was wondering if/how I can reuse a fragment definition created in application 1 within application 2?

Background: I have 4 application (due to technical reasons there need to be 4 standalone fiori applications) displaying similar data.

My approach would have been to create fragments and reuse them across all 4 applications.

But how can I load fragments from another application?

Most stuff I've found either is limited to relative paths or JavaScript modules....

Upvotes: 1

Views: 1488

Answers (1)

Pete
Pete

Reputation: 81

After digging a little further, I noticed that I can register the desired module path using

jQuery.sap.registerModulePath("name.space", "/sap/bc/ui5_ui5/sap/bsp_name");
  1. Afterwards name.space is available in XML view and can be used to load the fragments.
  2. i18n is not loaded though but this I can handle.

Upvotes: 1

Related Questions