To show the currently logged-in user and his Default Insert site in the header of the Maximo 7.5.0.5 application
This information is displayed in Maximo through a menu, but the user will first have to open it. It would be nice to always show the user his Default Insert Site.
Solution:
Show the Default Insert site of the user in the header of Maximo.
In the header there is room for some information, like shown in the picture below:
Step 1 - Locate the file
In order to show information in this part of Maximo we need to modify the titlebar.jsp
This file is located in \IBM\SMP\maximo\applications\maximo\maximouiweb\webmodule\webclient\components
This is regardless of what skin you use.
Make a copy of titlebar.jsp as a backup in this directory.
Modify the titlebar.jsp
After the line (line 20):
String userFullName = control.getWebClientSession().getUserInfo().getDisplayName();
Enter the following lines:
String defSite= "";
try
{
defSite= control.getWebClientSession().getUserInfo().getInsertSite();
}
catch(Exception ex)
{
defSite="Unknown";
}
In essention I create a variable that is empty. I try to get the user his InsertSite and put that in the variable. If no InsertSite exists I fill the variable with the text "Unknown"
Here a picture of the first change:
Then find the following block of code(original line number 130) :
<%=apptitle%>
Enter the following code after the code found above:
User: <%=userFullName%>
Insert Site: <%=defSite%>
Here I add the
code to set the new variable on the screen, I also show the userFullName
variable here in order to show the user his full name.
Here is a picture of the modification:
Next rebuild the maximo.ear and redeploy the Maximo application.
After loggin in
to Maximo you should see the username and default insert site in the
header. Could be that your browser has cached some headerinformation,
always try a hard refresh (CTRL + F5) if nothing shows up.
It should end up looking like this (I changed the name for privacy reasons):
It looks like
itis show twice, but that is only on the startscreen. When opening the
Workorders application for example you will see the second mention of
the name is useful:
No comments:
Post a Comment