I will start by explaining the issue in list applets: If more than one line of text is entered in a text area control of a selected record then the entire row automatically expands in height. This not only represents an undesired user experience when navigating through multiple records but also makes the reading of individual record values hard to follow.
A different issue is observed with text area controls displayed on form applets. HTML5 usually allows text areas to be manually expanded when trying to read a larger amount of text. However, this cannot be achieved in IE10/IE11. Needless to say this makes reading of large texts impossible on form applets where text area fields only display one line of text containing 1-2 words.
Fortunately, Siebel allows developers to modify the out-of-the-box Physical Renderer files of both form and list applets. The customisation solution presented below modifies the Phyisical Renderers to addresses both issues.
First, let's see how this custom feature works in form applets.
Click on the text area icon to open the popup editor:
If the text area control on the form applet is read-only then you will not be able to modify the text displayed in the popup editor. However, if it is editable then the popup editor will allow you to type text up to the point where the maximum character length of the underlying text area control is reached.
When the popup editor is closed all the text is passed back to the text area control:
Similar to form applets, the second set of screenshots demonstrate how the popup text editor works on list applets.
Click on the text area icon to open the popup editor:
Edit or read the text in the popup and when you are done press the close button to pass the text back to the list text area control:
Below I will explain how this all works. Basically 3 areas of customisation are required.
1. Install JQuery Plugin - Colorbox
This custom popup feature is based on "Colorbox"- a lightweight JQuery plugin (free download from http://www.jacklmoore.com/colorbox/ ). Siebel Open UI must first be configured to use this plugin.
2. Customise Physical Renderer files based on phyrenderer.js and jqgridrenderer.js
For IP2014 the original physical renderer files for both list and form applets are placed under SWEApp\Public\ENU\23044\Siebel folder.
Oracle does not recommend changing the code in these files directly so simply make a copy of them which you can modify and then configure the Siebel application to use the custom Physical Renderers instead.
Form Applets are rendered using phyrenderer.js and the following changes are applied:
Find the code for ShowUI function "ac.prototype.ShowUI=function()"
Add the following code before the close bracket "}" to make sure all existing code is already executed:
Next, add the code below before "return SiebelAppFacade.PhysicalRenderer"
List applets are rendered by jqgridrenderer.js This file is easier to read and modify. Simply find the code for rendering text area elements starting with " case textArea:" and replace with:
3. ( Optional) Apply custom css styling for colorbox classes in the main css file e.g. theme-aurora.css
To summarise, this customisation tackles a general limitation of text areas in OpenUI. The approach is similar to the way this usability was achieved in High Interactivity. The plugin and custom JavaScript code that I have chosen to configure/develop are solely for demonstration purposes and I am sure that there are other ways of achieving a similar result.
I hope you found this useful. I welcome any comments you might have and please do let me know if you think it needs any improvements.
Hi, I am facing issue with implementation of this as it gives “Undefined is not a function” Error and is unable to execute the commans of the plugin. Also please guide on how to register the plugins for this case
ReplyDeleteHi Anand,
DeleteThank you for showing interest in this blog.
From your description of the issue I suspect that the plugin might not be correctly registered in your application.
Please follow the steps below for registering the colorbox plugin:
1. Download and extract the colorbox-master folder under 3rdParty folder
2. Add the plugin file in Application - Manifest Files (e.g Name=3rdparty/colorbox-master/jquery.colorbox.js)
3. In Application - Manifest Administration create a new entry with:
a. UI Objects
Type=Application
Usage Type=Common
Name=PLATFORM INDEPENDENT
b. Object Expression
Level=1
c. Files
Name = 3rdparty/colorbox-master/jquery.colorbox.js
You should then be able to test the plugin in Siebel from the browser's console by calling it directly:
$.colorbox({html:”<h1>Colorbox Test</h1>”});
I hope this helps with your implementation.
Thanks a lot Mircea, it worked this time.
DeleteHi Mircea, Thanks for the work around for Text Area Popup box. It is working fine in my application.
DeleteIs it possible to add one more CANCEL button(and its operations) on colorbox popup?
Please let me know. Thanks
Hi Gayathri,
DeleteI'm happy to hear the custom popup works in your application.
It is possible to add a cancel button. You could add the <button> html code before the <textarea&rt; code in the OnOpen Function.
The custom code could look something like:
document.getElementById("cboxLoadedContent").innerHTML = '<button style="position: absolute; top: 1px; cursor: pointer; right: 80px;" type="button" onclick="$("#colorbox").hide()">Cancel</button><textarea ... '
I haven't tested it properly but I hope you found my suggestion useful.
Hi Mircea, Thanks for the work around for Text Area Popup box. It is working fine in my application in local.But when added to the server,there is some error in the script and the submenus (like summary,interactions) are not rendered. What could be the problem.
ReplyDeletePlease could you explain how to do implementation in local?
DeleteHi Mircea,
ReplyDeleteThanks for the workaround. After applying this fix, we have one issue. When we press F9 to send email, a new pop up window is opened. we have an option for comments box in this. But when we click on it, the popup window is appearing on the back of the email window and on top of the siebel main page. I mean the comments text area popup is between the email window and the siebel page. This is not allowing users to type anything into it as it is in background. Is there any alternative or a code change that can be done to bring the textarea pop up on top of email window.
Thanks.
Hi Rakesha,
DeleteThanks for showing interest in this post.
If you try to inspect the text area elements in any email communication applet you will notice the addition of rich-text classes (e.g. Class="RTCTextArea"). My suggestion is to tweak the code in phyrenderer.js to skip applying the pop-up text area feature when this class is part of the parent wrapper element.
Great workaround. Implemented and working fine. Made some small modifications. Is anyone successful in adding F2 shortcut key for opening this plugin?
ReplyDeleteGreat workaround. Implemented and working fine. Made some small modifications. Is anyone successful in adding F2 shortcut key for opening this plugin?
ReplyDeleteFigured out the answer for my question with following modifications:
ReplyDelete1. Create a new variable:
var stTextAreaIcon = $('textarea[name="' + stControl + '"]').attr( "name" ).toString()+"_icon"; //use icon suffix so that Siebel will add F2 event handler
2. Change the a .... hyper link to span
('textarea[name="' + stControl + '"]').parent().append('<span id='+stTextAreaIcon+' style=
3. Change the colorbox event handler as
$('span[id="'+stTextAreaIcon+'"]').colorbox({
Thanks again for wonderful suggestion. Above changes need to be implemented in JQGrid as well.
Hi,
ReplyDeleteThank you, the solution worked for us but there are some issues (though small) because of this custom code.
1) F9 email window (when Outbound Message Format = HTML) size is not proper and it is difficult to re-size every time by user. Do we've an option to avoid "Comments" popup for an element (in this case, F9 email window), please advise. Tried with IF condition for the element but did not work.
2) Can we lock the main Siebel screen when the "Comments" popup is open and enforce the user to close the window to proceed further (like we have it for a MVG)?
Thanks
Hi,
ReplyDeleteI am using plug-in wrapper to create dialog box on textarea fields. Dialog box opens up for both the form and list applets while opening it via "double-click", but while opening it on pressing of "F2 key", it only opens up for form applets and not for list applets.
Can you please suggest what could be the solution for this?
P.S. : I am using Siebel Open UI IP2014 / PS18
Thanks
Vivek
Hi,
ReplyDeleteI am using IP13, will this approach work in IP13? Also when I download the 'JQuery Plugin - Colorbox' plugin mentioned in point# 1 i got a folder including 2 js files and different example folders. Do I have to just place the below js files into 3rd party folder or the entire downloaded file to integrate with siebel. Can you please suggest?
jquery.colorbox-min.js
jquery.colorbox.js
Thanks,
Hi Mircea,
ReplyDeleteI am not able to see the icon in the form applet or list applet. Please suggest.
Thanks,
Hi Mircea,
ReplyDeleteI have deployed all above changes on server, but facing below issue. Can you help me?
TypeError: Cannot read property 'offsetWidth' of undefined
Thanks,
Ravi
Hi Ravikiran
DeleteHave you resolved this error TypeError: Cannot read property 'offsetWidth' of undefined
If so please suggest me.
thanks
Kesav
Hi Mircea,
ReplyDeleteI am getting the below error
TypeError: Cannot read property 'offsetWidth' of undefined
Can you help me?
Regards
Kesav
Stainless Steel Helix Earrings | Titha Ceramic Arts
ReplyDeleteTitanium Helix Earrings Designed with the Titha guy tang titanium toner Ceramic micro touch trimmer Arts titanium app T-Shirt, the Titha T-Shirt is an essential titanium engagement rings tool to oakley titanium sunglasses improve your durability and create a