Hello,
Here I come with an interesting post on Maximo customization.
Problem
-----------
Display logged in user's "Default insert site" on the maximo header bar.
Solution
-----------
Follow the steps below, this solution is tested on Maximo 7.5. You need to modify the code according to the Maximo version you are working on.
- Navigate to path IBM\SMP\maximo\applications\maximo\maximouiweb\webmodule\webclient\components on you application server
- Search for file titlebar.jsp
- Open file and locate code below.
- <span id="txtappname" class="<%if(useHomeButton){%>homeButton<%}%>txtappname"> <%=apptitle%>
</span> - Below the above code and under the same <td> tag. Paste the code below
- <%
String site = "ERROR";
String user = "TEMP";
MboSetRemote sessionSet = control.getWebClientSession().getMXSession().getMboSet("MAXSESSION");
sessionSet.setWhere(" MAXSESSIONUID = "+control.getWebClientSession().getMXSession().getUserInfo().getMaxSessionID()+" ");
sessionSet.reset();
if (sessionSet.getMbo(0) != null){
user = sessionSet.getMbo(0).getString("USERID");
// Get current insert site of user logged in
MboSetRemote userSet = control.getWebClientSession().getMXSession().getMboSet("MAXUSER");
userSet.setWhere(" userid ='"+user+"' ");
userSet.reset();
if (userSet.getMbo(0) != null){
site = userSet.getMbo(0).getString("DEFSITE");
}
userSet.close();
}
sessionSet.close();
%>
<font face="Arial" color="Yellow" size="4">
                 <B>Site :</B> <%=site%>
</font> - You are done.
- Difficulties to implement, write to me. I will be happy to help :-)
No comments:
Post a Comment