יום חמישי, 22 במרץ 2012

HTML content in BIP Report

This is war-cry for all BIP gladiators.

Recently while working with BIP reports we hit a road block in displaying HTML content. We need to display a control in BIP report with proper HTML formatting but however when report is rendered it displays HTML tag as is without formatting. The data input is RTCEmbedded control in siebel which saves data encapsulated in HTML tags but instead of transformation those tags are displayed in BIP report as normal text. We tried with integration approach as well as SQL query based reporting architecture but of no luck.

From Tim's blog we got an idea of XSLFO format but it is of not much help as while retrieving the content from database BIP engine process data as & l t; instead of proper HTML < or > tags i.e. they are not escaped. I have already tried below options to fail.

  •  Escaping <,> to its ascii equivalent in sql
  •  Using clob/Nclob column to store data
As a stop gap solution we are currently chopping HTML tags from the data using XSL and displaying content in a plain format. Any jail break on this trivial issue is most welcome. 

Happy Reporting!!



יום רביעי, 7 במרץ 2012

RTCEmbedded Control

"When the solution is simple, God is answering"- Albert Einstein

Recently we were asked to implement a embedded text editor in a control which could facilitate user for text formatting including features such as bold, italic,font, color etc.  The first reaction was can-we-do-it types with nothing popping in mind (Yeah, thought of Email Templates view never occurred ).But with some help of support web solution turned out to be much much simpler.

We can achieve this by using control of type "RTCEmbedded". This control type provides an embedded text editor which supports below html tag:
  • Bold < STRONG>
  • italic <EM>
  • Underline <U>
  • Ordered list <OL>
  • List items <LI>
  • <P>
  • <FONT>
  • <BLOCKQUOTE >


However there are certain caveats while using this type:
1 - Control doesn't turn out grey in case of read only conditions.
2 - Throws an error when reaching field length and clears out everything forcing user to renter everything.
3 - It is not currently possible to paste text and graphics (such as graph or image) within such controls.
4 - We can't use this column directly in SQL based reporting purpose without appropriate parsing.

Happy Crunching!!


יום ראשון, 26 בפברואר 2012

Error Messages in SI Mode


Time again to stimulate your grey cells. Architectural differences between SI and HI clients are well documented. Recently working with SI application we observed a strange thing. SI client handles processing of error/Validation messages from BC layer and UI layer in different ways.

While invoking RaiseErrorText from BC error message was displayed on the top view bar but while invoking the same from applet was taking to different error web page resulting in context loss. User has to click Back button to go to previous page.

Same holds true for DVM messages. While invoking from BC layer using run time events the error message is displayed on the same view but while invoking from UI layer error message is displayed in different error web page. I am not able to break this thing why it behaves differently on different layers. Any insight/thought on this would be of some help.

Happy Debugging!!



יום ראשון, 19 בפברואר 2012

Disabling button in SI Mode


Working with SI applications can be as good as playing with fire. Recently we faced an issue when some naughty users clicked button multiple times resulting in underline action getting executed multiple times. As in case of SI applications, if the method is taking time to execute then button is not disabled it remains active giving end user an impression of nothing-is-happening. So user may end up clicking the button multiple times.

The only way to prevent multiple clicks is to disable button as soon as it is clicked. Fortunately there is an article on support which provides solution to achieve the desired but a scripted one. Following piece of code can be used to disable button after click.

function WebApplet_ShowControl (ControlName, Property, Mode, &HTML)
{
    if(ControlName == "SubmitButton")
    {
      if(Property == "FormattedHtml")
      {
          var index = HTML.indexOf("onclick=");
          var start = HTML.substring(0,index+9);
          var end = HTML.substring(index+9);
          var func = 'setTimeout("a()",10);; ';
          var funcA = "<script>function a(){";
          funcA += "var c = document.getElementById('SUBMIT');";
          funcA += "c.outerHTML='';";
          funcA += "} <script>";
          HTML=start + func + end + funcA;
      }
    }
}
However, we wanted to implement the solution by configuration and yes, we were able to achieve by using following piece of code in "HTML Attributes" property of button.

onclick="function fn(){disabled=true;}setTimeout(fn, 100);"

The idea is to diable button once it is clicked and making a recursive call after 100 milliseconds by using setTimeout function so that it gives user an impression that button is disabled. There could be alternates to achieve this. Again piece of advice/comment is always welcome. 

Happy Crunching!!

יום שלישי, 7 בפברואר 2012

Cosmetic UI Changes


Cosmetics may be a weapon of women but it is always better to look over rather than over looked. Siebel OOB comes with a soothing look and feel but still it may not fit into coloring schemes. In this post we will discuss about some basic UI modifications.

Statutory Warning: Please take backup of existing files before you play around.

1 - Changing Oracle logo
This is the foremost change which should be done. lookout for the "CCFrameBanner.swt" template file and modify below code to suit your requirement.

<td align="right"><a href="http://www.oracle.com" target="_blank" ><swe:image name="POWERED_BY" category="HTML Control Icons"/></a></td>

Change this code to below code

<td align="right"><a href="http://YOURURL.com" TARGET="_blank"><img src = "images/YOURIMAGE.jpg" height ="30"></a></td>


2 - Changing login screen
In order to determine the positioning of the items on the login screen or change the graphics that appear on the login screen one has to modify web template file "SWELogin.swt". This web template file determines the layout of the web page items on the login screen.

3 - Changing Menubar color 
The menubar color can be changed by changing the jmenubar.js file.Background color of menubar is hard coded in the "jmenubar.js" file. Below attributes can be changed for desired appearance.
var MENUBAR_BGCOLOR = "#FF6633";
var MENUBAR_TEXTCOLOR = "#FFFFFF";
var MENUBAR_HIGHLIGHT_COLOR = "#FFFFFF";
var MENUBAR_SHADOW_COLOR = "yellow";

4 - Changing Screen Bar 
The screen tab are now implemented as java controls in Siebel 7.8. Their appearance is determined by the settings in the file jctrls.css. Below section controls the appearance of screen bar.
.clsScreenBar
{
   NC-TAB-BACKGROUND-COLOR: #333399;
   NC-TAB-BACKGROUND-COLOR-SELECTED: #F0F0F0;
   NC-TAB-BACKGROUND-COLOR-MOUSE: #F0F0F0;
   NC-TAB-FONT-COLOR: #FFFFFF;
   NC-TAB-FONT-COLOR-SELECTED: #333399;
   NC-TAB-FONT-FAMILY: Arial;
   NC-TAB-FONT-SIZE: 15;
   NC-LINK-FONT-FAMILY: Arial Black;
   NC-LINK-FONT-SIZE: 18;
   NC-LINK-FONT-COLOR: #333399;
   NC-LINK-FONT-COLOR-SELECTED: #333399;
}

5 - Changing view bar
Their appearance is determined by the settings in the file jctrls.css. Below section controls the appearance of view bar. 
.clsSubDetailView
{
   NC-TAB-BACKGROUND-COLOR: #466FB4;
   NC-TAB-BACKGROUND-COLOR-SELECTED: #F0F0F0;
   NC-TAB-BACKGROUND-COLOR-MOUSE: #000000;
   NC-TAB-FONT-COLOR: #FFFFFF;
   NC-TAB-FONT-COLOR-SELECTED: #333399;
   NC-TAB-FONT-FAMILY: Tahoma;
}

6 - Changing Background Color of selected row 
Again this could be easily achieved by changing settings in jctrls.css file. Below section controls it.
.clsJLCMain
{
JBACKGROUND-COLOR-ROW-ACTIVE: #FFFFFF;
}


One can definitely change applet and view layouts by changing underlying web templates.There is no second chance to create first impression so better have a good looking UI. 

Happy Beautification!!

יום חמישי, 2 בפברואר 2012

Distinct Property


Distinct clause is one of the powerful clause in SQL which helps to remove duplicates from the result set. In real time scenarios we are bound to have requirements which involves updates or removal of distinct records.



Siebel provides a,how-i-missed-type, "Distinct" property on business components that helps us to achieve just this. Business components in siebel 7.8 and higher have this property. Setting this property to TRUE allows the equivalent of a select distinct query as it suppresses system fields.This property enforces a "DISTINCT" clause on all fields present in the BC, which may lead to errors during execution. It is better to clone business component and include only fields which are required in distinct clause.

Document ID 867149.1 in support web explains this siebel virtue in detail.

Happy Crunching!!


יום שני, 23 בינואר 2012

Multilingual Confirm/Alert in Browser Script


Working with multilingual can be as challenging as playing tennis with rafael nadal on clay court. Siebel provides outstanding set up to enable multilingual application.

There are different object managers for different langauges. There are symbolic strings for multiple language references, there are message categories to enhance re-usability. Lookup's for value comparison in different languages and not to forget multilingual email templates along with BIP reports giving end user 100 percent localized effect.

There are still some non-localizable elements including log files and help applets. However while working on the browser side i was not able to translate the message in the desired language using "LookupMessage" method as it is only supported on the server side. In order to achieve localization we used below java methods to identify the language in url display message accordingly.

Lets say you want to display confirm box in french application probably this piece may help you to achieve desired results.


var sURL = document.location.href;
var sCount = sURL.search(/fra/i); // this will search for object manager language
if(sCount > 0)
var sMsg = "Décochez va supprimer les données, Voulez-vous procéder";
else
var sMsg = "Uncheck will remove the data, Do you want to proceed?";
if(confirm(sMsg))
return ("ContinueOperation");
else
return ("CancelOperation");


There could be alternates to achieve this. As i write, another issue related to multilingual is dangling in Stop step in workflow. Question is whether we can use LookupMessage function in workflows or not? Any thoughts on this are much appreciated.

Happy Crunching!!