13 Work With Application Resources
As you develop an application, you can import and export static resource files for use in your application's pages.
Resources are typically files that you import to support or add functionality to pages in your application. For example, when you want to use an image in a page, you can import the image as a resource into an images
folder, then use an Image component on a page to reference the imported image.
resources
folder to store custom components, images, translation files, and other resources that can be used in the application. Here are the folders created by default for the following types of resource files:
Folder | Description |
---|---|
actions |
Location for custom actions that you might define in your application. Right-click the folder to either create or import a custom action. |
components |
Location for custom web components that are installed to your application (by importing them in the Page Designer). You can also create a custom component here by clicking Create Component. Note: Importing custom components to theresources/components folder or creating them there makes them a part of your application. Because these components are not cached, you're likely to run into performance issues when they are downloaded each time you reload the Page Designer for preview, or at runtime when you publish an update to your app. As a best practice then, it helps to publish your components to a CDN (Content Delivery Network) or an external location that your browser can cache requests from. This is useful especially when you have multiple apps that use the same components. Talk to your administrator for site-specific information on how to publish these components externally.
|
css |
Location for the |
images |
Default location for any custom images that you might want to add to your application. Images in the application’s Flow artifacts can also contain an |
js |
Location for external JavaScript files that you want to use in your application's pages. |
strings |
Default location for your translation bundles. See About Translation Resources. Flow and page artifacts can also contain a |
To work with resources at the visual application level, see Export and Import Application Resources.