Customization to avoid the comma/dot separator in the integer value format on Start Center Result Sets

December 28, 2016 Yalcin Kumbasar

There is a technote on this issue which can be seen through this link.

Let me quote the question from the technote:

- When an attribute is defined as either smallint or Integer data type and shown in the screen, the value entered in the field shows like "1,300"

Technote suggests to change user’s locale from system regional and language options. This is not a practical solution considering customer reality. A tiny customization can be an alternative solution.

 

Resolution:

The display is configured in the following jsp: maximo.ear/maximouiweb.war/webclient/components/resultsetportlet.jsp.

Take a backup copy of the original jsp file. Next, find the code piece below:

if(displayData!=null)
{
    String finalData = !(isBidiEnabled && rInfo != null)? displayData.getData() :
    BidiUtils.applyBidiAttributes(rInfo,arrColumn[0],displayData.getData(),langcode);
    %><%=WebClientRuntime.makesafevalue(finalData)%><%
}

Then modify the code piece with the following part, where the customization is emphasized in bold font. It just checks if the field is of data type integer (6), smallint (7) or bigint (19) and then replaces commas and dots with empty string.

if(displayData!=null)
{
    int dataType = displayData.getTypeAsInt();
    boolean isInteger = dataType == 6 || dataType == 7 || dataType == 19;

    String finalData = !(isBidiEnabled && rInfo != null)? displayData.getData() :
    BidiUtils.applyBidiAttributes(rInfo,arrColumn[0],displayData.getData(),langcode);
    if(isInteger){
        finalData = !(isBidiEnabled && rInfo != null)? displayData.getData().replace(".","").replace(",","") :
        BidiUtils.applyBidiAttributes(rInfo,arrColumn[0],displayData.getData(),langcode);
    }
    %><%=WebClientRuntime.makesafevalue(finalData)%><%
}

Editing the jsp file takes effect instantly, it does not require system restart and that's it.

Previous Article
Personalizing Default and Visible Start Center Tabs on Maximo v7.1

Personalizing Start Center tabs for visible and default tabs is an improvement presented on version 7.5. Ye...

Next Article
Fixing Display Options (Color) for Numeric Fields with Separator on Start Center Result Set Portlet

On Start Center Result Set Portlets, expressions for color codes do not work as intended for numeric fields...

×

Want our latest news? Subscribe to our blog!

Last Name
First Name
Thank you!
Error - something went wrong!