When implementing specialized features in Maximo, the need to call out custom dialogs with custom actions arise pretty early.
Adding a new dialog in Maximo is a difficult task, especially if the need is not only to display information.
The following example shows how to add a dialog that displays locations based on a relationship with another location.
1. Add the action in Maximo
To do so, you must either do it manually by inserting the records in the MAXMENU table or using the GUI in the
Application Designer (Action: Add/Modify Select Action Menu). Usign the GUI is recommanded since it performs
some validation, not allowing position collision for instance. But in some cases, it may be necessary to change
existing records to allow item insertion. If you do so using SQLstatements, take care, you bypass Maximo
validation rules!
§ The action must be of type: OPTION.
§ The Key Value (code) you give to your action must match the name that will be given to the dialog.
Maximo uses this code match to automatically link the dialog with the action. In this example we will usethe code
A new dialog must be added in an application using XML editing. The application designer lets you
change an existing dialog but not add a new one. The following example shows an example of fields
from an application displayed in a dialog.
<dialog id="Testing" mboname="WARRANTYVIEW" label="Contract financial info" >
<helpgrid id="finaninfo_help" innerhtml="Financial information for this contract. Click OK when finished." />
<section id="finaninfo_grid_s1" border="true" >
<textbox id="finaninfo_grid_s1_1" dataattribute="totalcost"/>
<textbox id="finaninfo_grid_s1_2"dataattribute="currencycode" lookup='CURRENCY' />
<textbox id="finaninfo_grid_s1_3"dataattribute="totalbasecost" />
</section>
<buttongroup id="finaninfo_2" >
<pushbutton id="finaninfo_2_1" default="true"mxevent="dialogok" label="OK" />
<pushbutton id="finaninfo_2_2" mxevent="dialogcancel"label="Cancel" />
</buttongroup>
</dialog>
In this example, the name of the dialog, Testing, matches the action that will show the dialog.
After modifying the XML for the application, you must import it in the Application Designer to replace the current in Maximo.
The new dialog should be available from the Dialogs selection window.
In Maximo, a menu item is shown in the Action combobox if the user has the rights to use the action.
All action rights definitions are per-application and are done through the Application Designer.
Using the Add/Modify Signature Options action from the Select Action combo, you call out the dialog that lets
you add a new Signature.
This part is the easiest. Using the Security Group application, gives the rights on the action to the appropriate group.
This procedure works quite well when your dialog is only showing existing information based on the current Mbo.
For dialogs that needs to modify data by running either built-in functions or custom, a Bean class will be needed.
No comments:
Post a Comment