FDMEE API has a very good function to show custom messages on screen during on-line process.
This post is not to explain on how to use the function(as others have already posted about it) but to identity a bug in the function and to have a quick work around. This bug is found in recent patch-set, i haven't checked it in the base version
We had a requirement at a client to calculate certain measures and output it on the custom message box during the event script executions. The client gave us a format and we were not able to replicate it. The message box is designed in such a way that if you suppose enter a 3 line sentence in a string using \n parameter and print it using the function. The output on the screen will always be a single line.
lets consider the following text.
this is what typically Jython prints.
lets put this in a custom script and see what it displays
I have traced the CSS class to x15t which is responsible for this formatting.
skyros-v1-desktop-tav2tz-en-ltr-gecko-cmp.css is the file which takes care of this CSS class(this might be different if you are using a single managed server located at servers\EPMServer0\tmp\_WL_user\AIF_11.1.2.0\2fpww3\public\adf\styles\cache ). We added an extra tag called white-space:pre which would identify the \n as the new line and print it.
this is what the class finally looks like .x15q,.x15t {font-family:Tahoma, Verdana, Helvetica, sans-serif;font-weight:normal;font-size:11px;color:#000000;white-space:pre}
Make sure you don't change anything else because this class is used in almost all the pop-up windows. as white space just formats the strings in multiple lines we were fine with it.
Restart the web application after making the changes. Run the script and check the output.
Exactly like how we wanted. There are a couple of points to note when doing the change. X15T is the class used in almost all information boxes so the change will effect everywhere, We are doing a change in the temporary file which means if deleted the settings are gone, Restart of the services will not delete this temporary.
While writing this post i observed that this behaviour is only in the new versions of IE and Mozilla. IE8 however is able to get the output in multiple lines using <br>
I know this is not a convincing solution but it served our purpose. We are able to get the output exactly how we wanted. Hopefully Oracle will give us a fix in the next patch set.
skyros-v1-desktop-tav2tz-en-ltr-gecko-cmp.css is the file which takes care of this CSS class(this might be different if you are using a single managed server located at servers\EPMServer0\tmp\_WL_user\AIF_11.1.2.0\2fpww3\public\adf\styles\cache ). We added an extra tag called white-space:pre which would identify the \n as the new line and print it.
this is what the class finally looks like .x15q,.x15t {font-family:Tahoma, Verdana, Helvetica, sans-serif;font-weight:normal;font-size:11px;color:#000000;white-space:pre}
Make sure you don't change anything else because this class is used in almost all the pop-up windows. as white space just formats the strings in multiple lines we were fine with it.
Restart the web application after making the changes. Run the script and check the output.
Exactly like how we wanted. There are a couple of points to note when doing the change. X15T is the class used in almost all information boxes so the change will effect everywhere, We are doing a change in the temporary file which means if deleted the settings are gone, Restart of the services will not delete this temporary.
While writing this post i observed that this behaviour is only in the new versions of IE and Mozilla. IE8 however is able to get the output in multiple lines using <br>
I know this is not a convincing solution but it served our purpose. We are able to get the output exactly how we wanted. Hopefully Oracle will give us a fix in the next patch set.