XML Views and Resource Bundle Declarations

| 1 min read

Just a quick post on the train on the way down to London this morning.

The other day, Andreas Kunz pointed to an overview of the MVC options which contains very detailed information - an interesting and recommended read. One of the things that piqued my interest was the ability, in XML views, to specify a resource bundle (for internationalisation) declaratively, using a couple of attributes of the root View element. This I thought was rather neat.

So further to my recent explorations and posts on XML views …

… I thought I'd put together a little runnable app and make it available on sapui5bin, to demonstrate it. The result is XMLResourceBundleDeclaration, which is an index file, instantiating an XML view that has the resourceBundle declaration in it; this points to the resourceBundle.properties file in the i18n folder where you might expect to find it in other apps too.

The runnable is here: https://github.com/qmacro/sapui5bin/tree/master/XMLResourceBundleDeclaration

Share and enjoy!

Originally published on SAP Community