The Preview command

Information about the menu command that is used to preview an application or an environment.

About this task

You use this menu option when you want to preview an application or one of its environments, without triggering a rebuild and redeployment of it to the designated test server.

Note: The Preview feature requires that your designated test server is running and that the application was built at least once for current test server configuration.

Procedure

When you select Run As > Preview, MobileFirst Studio displays an instant preview, depending on the project element that is selected:
  • Common preview – If you right-click the common folder in your project hierarchy and choose this command, MobileFirst Studio previews all common resources. This action opens a browser with a simple preview of your application, independent of any development environment you might have installed.
  • Single environment preview – If you right-click an environment folder in your project hierarchy and choose this command, MobileFirst Studio previews that environment with the Mobile Browser Simulator.
  • All environments preview – If you right-click the main application node in your project hierarchy and choose this command, MobileFirst Studio previews that environment with the Mobile Browser Simulator, displaying a preview for every environment you added to your application.
Important: If you use a MobileFirst Shell Component in your inner application, you might see incorrect results with a browser-based preview of the application.

In MobileFirst Studio V6.1.0, the preview feature that you can start by selecting Run As > Preview or from the MobileFirst 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 by using either a device emulator (Android or iOS) or an actual native device.