You can create a menu entry for a new web UI framework screen using the Applications
Manger by using the resource, menu, user permissions, or struts XML file items. Additionally, you
can create a new menu by using the Code Template Generator.
About this task
You can use the Applications Manager to create a new menu
entry for a new Web UI Framework screen using the following items:
- Resource
- Menu
- User permissions
- Struts xml file
You can also create a new menu using the Code Template
Generator of the Designer Workbench. Use the Code Template Generator
to access the Code Update page, where you create the menu using code
that you generated in the Code Template Generator.
Procedure
- Launch the application.
- Launch the Applications Manager.
- Click Applications > Application
Platform.
- Create a new resource by doing the following:
- Double-click the Presentation item.
- Double-click the Resources item.
The Resource Hierarchy appears.
- Select the Sterling_Supply_Chain_Applications_Console item.
- Click the Create New button (the
green plus sign).
The Resource Details screen appears.
- Type information for all the tags.
The
Resource ID tag associates menus and resources. For the URL tag, type <package
namespace in your struts.xml file>/<action name>.
For the Resource Type tag, select StrutsAction from
the dropdown list.
Note: The URL package name and the action
name in the struts.xml file should be the same.
- Click the Save button in the
upper right corner of the Resource Details screen.
- Create the new screen using the Designer Workbench.
- Copy all of the generated files of the new screen to a
new folder in the <app_dir>/webpages directory.
These files include the <newscreen>.json, <newscreen>.js, <newscreen>_config.js,
and <newscreen>.js.sample files.
- Create a new menu by doing the following:
- Double-click the Presentation item.
- Double-click the Menu item.
The Menu Hierarchy appears.
- Double-click the option for the menu where the new screen
will be accessed.
For example, you would double-click
the <application>_Admin_Menu option
to create a menu under the top menu or under an existing submenu like
AdminPage.
- Click the parent menu for the new menu entry.
- Click the Create New Menu Item button
(it includes a green plus sign).
The Menu Item Details
screen appears.
- Type information for all the tags.
For
the Resource ID tag, select the resource with which this menu should
be associated.
- Give user permissions by doing the following:
- Double-click the Security item.
- Double-click the Users item.
The User Search screen appears.
- Select a user and subscribe to a group. For example,
you could select <application>admin and
subscribe to the SYSTEM group.
- Under the Security item, double-click the Groups item.
The Groups screen appears.
- Edit the details for the user's default group. For <application>admin,
the default group is <application>admingroup.
- Double-click the default group name to display the Group
Details screen.
- Click the Permissions button
for the Cross Application option.
- Allow the user access to the new Struts action.
- Save the changes and revert the group subscriptions
to the default values.
- Define the Struts action in a Struts config file which
serves the page that is linked to where you click on the menu.
You can use the Struts file in the Code Template Generator to define
the Struts action, which you would then paste into the above mentioned
config file. The resourceId should be the same as the resourceId
defined in the Applications Manager.
The JAR file for the
install3rdParty.sh command should also contain the java class file
for this Struts action.
<struts>
<package name="<package-name>" namespace=/<namepsace>"" extends="struts-default">
<action name="home" class="<struts-action-class>">
<param name="RessourceId"><resourceId></param>
<result name="success"><result-1></result>
</action>
</package>
</struts>