Thursday, July 8, 2010

seTimeOut - RefreshApplet Browser Script

A few tricks with setTimeout()
Filed under eScript Viewed: 1,347 times 1 Comment
(7 votes, average: 5.00 out of 5)
Loading ...
Vertex a quite well known reader of Siebel Unleashed has shared with a really interesting and useful article. This is a must read for everybody who is into Siebel configuration.
There is one function that, if used properly, could do some nice stuff on user interface. This function name is setTimeout() and it allows you to execute a browser script at some point in the future.
It takes two parameters:
a function to call
time to wait in milliseconds.
I’ll show you two ways of using this function, which are both implemented in our app.
Auto refreshing applet:
Let’s say we have a requirement to refresh certain list applet every couple seconds or so. Our shipment manager is rather lazy and is not particularly fond of manual and tedious requerying of pending shipments list applet
To reach this goal we might use setTimeout() to refresh the applet at equal intervals.
Open Browser Script editor on your applet and create a function:
function Refresh()
{
var oMyApplet = theApplication().FindApplet ("Your_Applet_Here");
if (oMyApplet) {
oMyApplet.InvokeMethod ("RefreshBusComp");
setTimeout ("Refresh()", 5000);
}
}

This function will find your applet and refresh it. It will also schedule itself to be reinvoked in 5 seconds.
The only thing left is to call this function for the first time. A perfect place to do it – Applet_Load event.
function Applet_Load ()
{
setTimeout ("Refresh()", 5000)
}

Flashing control/label:
Assume the requirement: draw user attention to a critical field if it has invalid or questionable data.
One cool way to do this is by making the field flashing red for example. We’ll start with creating our main function (Browser Script):
function Flash()
{
var oMyApplet = theApplication().FindApplet ("Your_Applet_Here ");
if (oMyApplet) {
var oMyControl = oMyApplet.FindControl ("Your_Control_Here");
if (oMyControl.GetProperty ("FontColor") == "#FF0000")
oMyControl.SetProperty ("FontColor", "#000000");
else
oMyControl.SetProperty ("FontColor", "#FF0000");
setTimeout ("Flash()", 200)
}
}

And to invoke this function for the first time:
function Applet_Load ()
{
Flash();
}
This way the field will flash red 2.5 times a second. You may enhance the script by adding data validation or even use gradient transition
You might as well flash the control’s label rather than the text. In order to do so you will have to add a control user property useLabelID with value TRUE and use oMyControl.SetLabelProperty instead of oMyControl.SetProperty.
Thanks a lot Vertex for such a wonderful article
Related Posts
Framework – addWeekDays
Framework – Write to File
It’s raining frameworks
Understanding Prototypes
Continue the loop
Variable declaration best practice?
Siebel Unleashed Poll Results
Visitors to this post, also read:
It’s raining frameworks
Siebel and System performance
Continue the loop
Siebel Unleashed Poll Results
Understanding Prototypes
Powered by Where did they go from here?
← Next post Previous post →
Article by neel
Authors bio is coming up shortly. neel tagged this post with: eScript Read 412 articles by neel
Loading comments...

Problems loading Disqus?
Glad you liked it. Would you like to share?
Facebook
Twitter
Share No thanks
Sharing this page ...
Thanks! Close

Login options




About Disqus
Login
Add New Comment
Showing 1 comments
Sort by Oldest first Subscribe by email Subscribe by RSS dude siebel 3 months ago

Good article, but does it work for Server scripts as well?, can i use this against a buscomp events?
As an Example, refresh a applet until the child record is updated?,
Flag
Like Reply Reply
Trackback URL http://disqus.com/forums/siebel/a_few_tricks_with_settimeout/trackback/
blog comments powered by Disqus
Search




Polls
Should I merge Interview Site in main website?
Yes, Merge Interview site and create category in main site. (59%, 138 Votes)
No, Keep interview site seperate. (41%, 94 Votes)
Total Voters: 232
Loading ...

Subscribe
Enter your e-mail address

Recent
Comments
Tags
Calculated field and Picklist
Query and QueryBiDirectional
Framework – addWeekDays
Framework – Write to File
It’s raining frameworks
Lockerz Redemption
EAI Siebel Adapter-Query Page
Identifying SRF differences
Understanding Prototypes
Chanks on Query Problem in Siebel
Gaurishaks on Siebel EAI and XML
princemain on Query and QueryBiDirectional
neelmani on Query and QueryBiDirectional
Pankaj Juneja on Query and QueryBiDirectional
Alfounet on esd bhd and ctd–trio that makes Email Marketing server work.
Toxcct on Framework – addWeekDays
neelmani on Framework – addWeekDays
Toxcct on Framework – addWeekDays
abs framework audit trail Best Practices Case Study Configuration Data Source Downloads EAI eScript Forum framework Functional Siebel How To Informatica Introduction I Wish I Knew Jobs List of Values Logs Metalink Office Humor Oracle MetaLink Performance personal Problem Solutions Product Configurator Runtime Events Scriptless Siebel siebel Siebel 8.0 Siebel Admin Siebel Administration Siebel Analytics Siebel EAI siebel performance Siebel Testing Siebel Tools Signals SQL Tips User Properties User property Web Services workflow Workflows

Archives
July 2010 (3)
June 2010 (6)
May 2010 (4)
April 2010 (11)
March 2010 (3)
February 2010 (12)
January 2010 (9)
December 2009 (3)
November 2009 (11)
October 2009 (8)
September 2009 (5)
August 2009 (6)
July 2009 (15)
June 2009 (13)
May 2009 (5)
April 2009 (8)
March 2009 (9)
February 2009 (4)
January 2009 (5)
December 2008 (7)
November 2008 (8)
October 2008 (11)
September 2008 (9)
August 2008 (20)
July 2008 (19)
June 2008 (21)
May 2008 (23)
April 2008 (16)
March 2008 (20)
February 2008 (23)
January 2008 (23)
December 2007 (14)
November 2007 (22)
October 2007 (41)
September 2007 (10)
Friends
Alex’s Siebel Blog
Impossible Siebel
Categories
Back to Basics (5)
Best Practices (4)
Case Study (30)
Check In -Check Out (1)
Configuration (69)
Downloads (18)
eScript (68)
framework (4)
Functional Siebel (2)
Got Problems??? (3)
How To (57)
I Wish I Knew (7)
Informatica (2)
Introduction (6)
Jobs (2)
List of Values (4)
Non-Siebel (11)
Office Humor (4)
Oracle MetaLink (11)
Problem Solutions (50)
Product Configurator (9)
Project Management (1)
Questions-Answers (1)
Runtime Events (2)
Scriptless Siebel (5)
Siebel 8.0 (8)
Siebel Administration (7)
Siebel Analytics (5)
Siebel Data Source (3)
Siebel EAI (36)
Siebel Logs (7)
Siebel Testing (4)
Siebel Tools (16)
Signals (2)
Smart Scripts (1)
SQL (7)
Uncategorized (4)
User Properties (8)
Web Services (11)
Workflows (15)
Most Voted
Siebel CRM – Back to Basics (Siebel Architechture). - 56 votes
Apply and Activate button in Siebel Tools - 45 votes
Siebel Enterprise Integration Manager (EIM) – An Overview. - 32 votes
Siebel CRM How to – Configure a Join. - 30 votes
Siebel Analytics an Overview - 25 votes
Most Viewed
High Interactivity Framework Problem. - 17,940 views
Siebel CRM How to – Configure a Join. - 16,639 views
Siebel EAI – An Overview. - 16,104 views
Siebel CRM – Back to Basics (Siebel Architechture). - 14,177 views
Siebel How To – Create Inbound and Outbound Webservice? - 13,723 views
Siebel Interview
How to enable a particular child entity?
Make record editable for some and read only for some?
What is difference between Siebel Browser Script and Server Script?
How to invoke Smart Script on click of a button?
difference between External and Internal IO?
Oracle BI
Merge and Hash Joins in Oracle
Clear button for Default Prompts
Insight of OBIEE Architecture-II
Insight of OBIEE Architecture
Refresh Prompts while navigating Dashboard Pages
Siebel Unleashed is proudly powered by WordPress. Entries (RSS) and Comments (RSS) | Swift by Satish Gandham a product of SwiftThemes.Com
Tools
Wiwi Title

Powered by
Close window
Recent posts
Recent posts
9 Online
View real time stats (popular posts, dynamic map)

Online

Donate
Make a donation to us

Donate

What is this?

Wibiya

Last Notification
New On Twitter

Dashboard

Share
Share This Post
Subscribe to our RSS feed
Subscribe to our RSS feed

Subscribe to our RSS feed


Click Here to Share

A few tricks with setTimeout() | Siebel Unleashed

Facebook

Twitter

MySpace

Digg

Buzz

Email

Digg

Reddit

Twitter

Facebook

Google

Linkedin
Powered by Wibiya and AddThis

Thanks & Regards

Vivin M. Deshpande
Siebel Consultant
IBM India P Ltd
Mob: 9986608421

2 comments:

Unknown said...

Philippine blogger Bryan Yambao went from reading his mother magazines to the front rows of the world top catwalks at warp speed, as the Internet demolishes the exclusive barriers of high fashion.
dsafqqzzxxccasasa Isabel Marant Flat

andrea chiu said...

You have post a very informative topics that readers would always love to visit. Thanks for taking time sharing this with us.

jandi

www.triciajoy.com