IBM Support

Setting a wrap length in resultsetportlet.jsp file for fields in Start Center

Technical Blog Post


Abstract

Setting a wrap length in resultsetportlet.jsp file for fields in Start Center

Body

What if your customers who updated the system property webclient.shortenportlettext for truncating the description in result set portlets on start centers are looking to increase the length the display is set to as there is a lot of white space between columns that could be put to better use ?

image

When this is limited to a short number of characters, like 35 characters only, the description will only show something like this instead o the whole description value:

ROBERTO 01 ROBERTO 02...  

NOTE : The value above is very short and cannot be seen completely.


Some users want to increase the width the description should be set to displays, so it looks like the screenshot below. I was able to adjust the wrap length for the portlet fields by modifying the resultsetportlet.jsp file in our Maximo environments.

image

Steps to follow :

1- On your Maximo server, navigate on your Maximo installation folder, to this folder below :

...SMP\maximo\applications\maximo\maximouiweb\webmodule\webclient\components

2- Locate and edit the resultsetportlet.jsp file, on a good XML/HTML/JSP editor, such as Notepad++

3- Search for "boolean shortenText = Boolean.valueOf(WebClientRuntime.getWebClientProperty" , and it will show you the results around line 519 of that file, and you will see the following section :

boolean shortenText = Boolean.valueOf(WebClientRuntime.getWebClientProperty("webclient.shortenportlettext","true")).booleanValue();
if (shortenText)
{
finalData=HTML.decode(finalData);
finalData = WebClientRuntime.shortenString(finalData,35);
finalData=HTML.encodeTolerant(finalData);
}


NOTE : All you have to do is to change the value 35 above to a higher value, such as 100.  That value indicates the number of characters to be displayed on the portlet text fields.

4- Edit the finalData value to your desired value and save the changes to resultsetportlet.jsp file.

5- After you make the change, please stop Maximo, rebuild and redeploy EAR files.

Once Maximo is restarted, just clear the cache and you should now be able to see more characters in the portlet fields.


See ya

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11112631