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.
Open the index.html file and add a <button> element.
If this does not help you, please learn how to ask questions first.
You can Edit the app.xml in <: Install Root :>/apps/<: app :>/antifact, like IBM MAXIMO Anywhere guide.
link: https://www.ibm.com/developerworks/community/blogs/a9ba1efe-b731-4317-9724-a181d6155e3a/entry/Adding_Custom_Fields_to_a_Maximo_Anywhere_application?lang=en
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.
Related
In a VSIX project, in the .vsct file I can see how to target different objects and provide a custom context menu:
For instance, the following will target an item node in the solution explorer:
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_ITEMNODE"/>
<!--<Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/>-->
</Group>
Changing the id property from IDM_VS_CTXT_ITEMNODE to IDM_VS_CTXT_CODEWIN will result in the context menu appearing in the code window instead.
This is documented here:
Microsoft Documentation
However, I would like my context menu to appear in the 'Server Explorer' instead. An example and a link to the documentation would be very helpful.
To find Visual Studio menu guids, this usually works.
In your registry set EnableVSIPLogging DWORD to 1, under HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\General.
Restart Visual Studio (and computer?) and hold Ctrl+Shift and right click an item in the server explorer, it will open a dialog window with something like this:
You can go from there.
Thanks to Paul Swetz and James Sinclair I was able to get this working.
Using the method described by Paul Swetz I could identify the guid required for the Server Window object I was clicking, in this case the table node.
Having got that I added that id to the Symbols in the .vsct file, with a name of my choice:
<GuidSymbol name="guidWhatever" value="{d4f02a6a-c5ae-4bf2-938d-f1625bdca0e2}"> <!--//server explorer - table-->
<IDSymbol name="IDMX_DV_OBJECT_NODE" value="0x8200"/>
</GuidSymbol>
Now I can use that in Groups and the custom command appears in the dropdown.
<Groups>
<Group guid="guidFirstCommandPackageCmdSet" id="MyMenuGroup" priority="0x0600">
<!--<Parent guid="{D309F791-903F-11D0-9EFC-00A0C911004F}" id="IDM_VS_CTXT_ITEMNODE"/>-->
<Parent guid="guidWhatever" id="IDMX_DV_OBJECT_NODE"/>
</Group>
</Groups>
The only problem now is identifying and accessing the selected table and database but that's another matter.
All of VS 2015's commands, menus, toolbars etc are detailed in a couple of c++ header files (stdidcmd.h and vsshlids.h).
On my install they are in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VSSDK\VisualStudioIntegration\Common\Inc'.
Had a very brief look in the files and i think you'll need something starting
IDG_SE_CONTEXT_ to target groups within the server explorer context menu
IDG_SE_TOOLBAR_ to get into the toolbar
IDM_SE_CONTEXT_ to get to the context menu
IDM_SE_TOOLBAR_ to get to the toolbar menu
I am working on HTML Application.So I want the code that will make my app to disable view source right click mouse in my app.Is there any way,please help me buddy
Put contextmenu="no" in your HTA:APPLICATION header tag. This disables the right click but it does not prevent someone who knows what they are doing from viewing the .hta file s it is plain text. If you setup your users to open the .hta file via a shortcut, they will be less able to access the file that contains the code.
<HTA:APPLICATION
ID="myapp"
APPLICATIONNAME="myapp"
SCROLL="no"
SINGLEINSTANCE="yes"
contextmenu="no"
>
Another option is to convert your hta to a .exe file. Search for an app as there are a few and I've not tried them all.
I have referenced Windows.Phone.Controls and Windows.Phone.Controls.Toolkit.
When adding a map to the screen with via XML:
<phone:PanoramaItem Header="Location">
<maps:Map x:Name="Map" />
</phone:PanoramaItem>
And adding the Capability in the App Manifest:
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Deployment.Parts>
<Capability Name="ID_CAP_MAP" />
</Deployment.Parts>
Whenever I launch the application, it just stays on the Loading screen. I have added the Capability tag in the AppManifest because it fixed the "First chance exception".
Where am I going wrong? Can anyone see an obvious fix?
Edit
if I take the map off, the app loads perfectly fine.
You don't add capabilities in AppManifest.xml. You add them in WMAppManifest.xml. Just open this file, it has a GUI window where you can tick the caps you want under Capabilities tab.
I am at a loss how to add a custom button to a context menu in Outlook 2013. In Outlook 2007 and 2010 I manage to do that successfully with a CommandBarButton, but that is not possible anymore in 2013. Unfortunately, I could not find a tutorial how to convert my code or mitigate the issue.
My question now is: How can I create, add and access a custom RibbonButton that should appear in the Outlook context menu of mail, calendar and contact items?
I have already tried simple code like this:
<?xml version="1.0" encoding="utf-8" ?>
<customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<contextMenus>
<contextMenu idMso="ContextMenuMailItem">
<button id="MyContextMenuContactItem"
label="ContextMenuContactItem"
onAction="OnMyButtonClick"/>
</contextMenu>
</contextMenus>
</customUI>
... but nothing happens, it is not displayed. The constructor of its .cs file is called, but nothing else.
If I try adding it programmatically via
Globals.Factory.GetRibbonFactory().CreateRibbonButton()
.. then I do not know how to add it to a preexisting context menu.
I must be missing something that is necessary to add the item to the context menu. Can anyone please point me to it?
PS: I am testing with Outlook 2007.
The problem was caused by a wrong stub that was automatically inserted by Visual Studio. The return value of GetCustomUI was always null because GetResourceText could not find the resource (although to me it looked valid). When I changed it to File.ReadAllText(Properties.Resources.MyRibbonXmlFile), Ribbon_Load was finally called.
I have this add-on bar at the button of my firefox window where several buttons from extensions are shown. How can I add my own button there?
you can open the source code of that bar and add your own button
example (I'm on Windows right now):
C:\%AppData%\Roaming\Mozilla\Firefox\Profiles\PROFILEID.default\extensions\EXTENSION-TO-EDIT-FOLDER\chrome\content
A good way to do this is with the Add-on SDK. You can find documentation on adding an Add-on bar button here.
An additional benefit of using the SDK is that your add-ons won't require a restart after they are installed.
hey it is called a status bar and u should consider putting a statusbar xul element
e.g
<?xml version="1.0"?>
<overlay id="sample"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<statusbar id="status-bar">
<statusbarpanel id="my-panel" label="Hello, World" />
</statusbar>
</overlay>
For more details check this link statusbar attributes, methods and properties