Show TOC

Background documentationSource Code

 

You can use this tab page to view the generated HTML source code for the created dashboard. You can append the existing source code with additional CSS or JavaScipts from the SAP MII Workbench. The JavaScripts are added to the generated source code in the section that is marked for user-entered script. When you choose Edit, the entire source code area is split into two parts:

  • Left (or upper) part represents the generated HTML source code which is not editable.

  • Right (or lower) part represents the hook points that can be edited. This section is further split into two areas: custom code and Script Assistant. In custom code area, you can add additional code that must be available at runtime. You can use any objects that are created in the generated code area or the available APIs to modify the behavior of the objects at runtime. In Script Assistant, you can add function calls that are available for each object type. For more details, see Script Assistant.

If the Split HTML and JS option is selected under Preferences, the source code is separated into HTML and JavaScript and displayed on two different tabs.

You can undo, redo, or reset the changes by choosing the relevant buttons. You can change the layout view by choosing Switch View.

Note Note

The Source Code tab is hidden by default. Only users assigned with action XMII_SSCE_DEVELOPER can edit the source code.

End of the note.

Activities

  1. For the selected dashboard, choose Start of the navigation path Source Code Next navigation step Edit End of the navigation path.

    The screen displays the uneditable and editable source codes.

  2. To add a CSS or JavaScript file, choose Add Include(s). Browse or enter a file in File Path field. Choose OK.

  3. You can choose methods or queries or methods from the Script Assistant tab and choose Insert.

    The selected method, applet, or query is displayed in the Add Custom Code box.

  4. Choose Apply.

    The content is added in the <script></script> tag within the section marked as "Your code starts here" and "Your code ends here".