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

 

 

This is how it displays in a Result Set portlet in Start Center, limited to only 35 characters :

image


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":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11112631