The Preview command
Information about the menu command used to preview an application or an environment.
About this task
You use this menu option when to preview an application or one of its environments, without triggering a rebuild and redeployment of it to the designated test server.
The Preview feature requires that the designated test server is running and that the application was built at least once for current test server configuration.
When we select Run As > Preview, MobileFirst Studio displays an instant preview, depending on the project element that is selected:
- Common preview – If we right-click the common folder in the project hierarchy and choose this command, MobileFirst Studio previews all common resources. This action opens a browser with a simple preview of the application, independent of any development environment you might have installed.
- Single environment preview – If we right-click an environment folder in the project hierarchy and choose this command, MobileFirst Studio previews that environment with the Mobile Browser Simulator.
- All environments preview – If we right-click the main application node in the project hierarchy and choose this command, MobileFirst Studio previews that environment with the Mobile Browser Simulator, displaying a preview for every environment we added to the application.
Important: If we use a MobileFirst Shell Component in the inner application, you might see incorrect results with a browser-based preview of the application.
In MobileFirst Studio v6.1.0, the preview feature we can start by selecting Run As > Preview or from the operations console, changed. As an unintended side-effect, the preview of an inner application that references a shell component might not render as expected. Specifically, the fragments that normally get injected into the HTML page for the inner application are missing. As a result, any additional links, such as scripts, or CSS, are omitted during the preview. Also, if an extra user interface is defined in the shell, it is omitted as well.
To see a correct preview for an inner application that uses a shell, build the application and start it using either a device emulator (Android or iOS) or an actual native device.
Parent topic: Build and deploy in MobileFirst Studio