Im new to Maximo. I already have maximo anywhere work execution app. Please let me know how to add new button in it through worklight.
3 Answers
Open the index.html file and add a <button>
element.
If this does not help you, please learn how to ask questions first.

- 44,156
- 13
- 50
- 89
-
I didnt meant adding new button in index.html. How to add new maximo widget inside work execution app. I have added new view inside app,xml as below
Will this add new Test label in View? – developer Nov 30 '15 at 08:44 -
PFB link with screenshot, i would like to add a button at top right corner http://servicemanagement360.com/wp-content/uploads/2014/06/maximo-anywhere-2.png – developer Nov 30 '15 at 11:55
-
I have added one button in app.xml , its displayed in app only when i have added button code in generated/application/ui/ApplicationUIBuilder.js. But ApplicationUIBuilder.js is generated code. Please help in identifying actual source code where i need to add this button to display in app other than app.xml entry – developer Dec 09 '15 at 11:50
You can Edit the app.xml in <: Install Root :>/apps/<: app :>/antifact, like IBM MAXIMO Anywhere guide.

- 1
- 2
Before you embark on that Journey, be sure to back up the default app.xml. In order to add a button you first need to modify the Application UI, changes are made in the app.xml file .\MaximoAnywhere\apps\WorkExecution\artifact\app.xml. You can add additional tags to the file, which builds the UI and makes the app.
<button border="false" cssClass="statusIcon" id="WorkExecution.WorkDetailView_status_button_1" layoutInsertAt="item3" resourceAttribute="returnActive">
<states id="WorkExecution.WorkDetailView_status_buttons_return">
<state id="WorkExecution.WorkOrderDetail_ReturnButton_render_active" image="/images/RETURNED.png" label="Return" value="true"/>
<state default="true" id="WorkExecution.WorkOrderDetail_ReturnButton_render_inactive" image="/images/RETURNED_INACTIVE.png" label="Return" value="false"/>
</states>
<eventHandlers id="WorkExecution.WorkDetailView_status_button_eventHandlers_1">
<eventHandler class="application.handlers.Custom.WODetailHandler" event="render" id="WorkExecution.WorkOrderDetail_ReturnButton_render" method="renderReturnedIcon"/>
<eventHandler class="application.handlers.Custom.WODetailHandler" event="click" id="WorkExecution.WorkDetailView_status_button_1_eventHandlers" method="onReturnStatusIconClicked"/>
</eventHandlers>
</button>
Thats an example of a button we use in the app on the Work Details screen. Notice it has a CSS class that we've added, as well as a resourceAttribute that manages the state of the button. Putting a state on the button tells the app when to render which of the images. Lastly, we have event handlers that are tied to the button, with corresponding code written in the Custom.WODetailHandler file.

- 307
- 1
- 8