Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Display variable in banner area or message of the day

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] Display variable in banner area or message of the day
 Login/Join
 
Guru
posted
Hi,

I see that a New Feature Request has been submitted for this topic.

Until that becomes a reality I'm wondering if anyone has found a way to do this. I tried creating a page in the HTML Composer, including the system variables I needed, and then replacing the banner.htm code with that. This doesn't work. It won't resolve the variables.
I also tried putting the HTML page in an APP folder and then redirecting to it. No joy. I even tried putting it inside an iframe in the banner.htm file. No luck there either.

Has anybody got this to work? If so, will you please share your technique?

Anybody from IBI have an update on the NFR?

Thanks all,

Dan

This message has been edited. Last edited by: Kerry,


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Unless I misunderstood you, HTML on its own does not resolve variables.

Are you working with WebFOCUS B.I. Dashboards? If so, please tell us what exactly would you like to do.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Dan you should be able to do this with a call to WF and some javascript. Just edit the message.html, add in what you need.

I've done something similar with the banner.

You should create a custom template, though.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
I did this for a client a few months ago. They wanted a date from a database to show up in the message banner.

The Fex:
SET HOLDLIST = PRINTONLY
TABLE FILE payroll-type-table
SUM 
     COMPUTE C_DT1/A8DMYY = MAX.TIME_DIM_DATE; NOPRINT
     COMPUTE C_DT2/A10 = EDIT(C_DT1, '99/99/9999');
ON TABLE PCHOLD FORMAT ALPHA
END
  


The banner html:
<!--$Revision: 1.1 $:-->
<HTML><HEAD><title></title>
<LINK REL=STYLESHEET TYPE='text/css' HREF='banner.css'>
<script type='text/javascript' src='/approot/baseapp/js/prototype-1.6.0.3.js'></script>
<script type='text/javascript'>
function windowOnLoad() {
	new Ajax.Request("/ibi_apps/WFServlet", {
		method: 'post',
		parameters: {
			IBIAPP_app: 'baseapp hr_prod',
			IBIF_ex: 'getpayendingdate'
		},
		onSuccess: function(_request) {
			$('customMsg').innerHTML += " " + _request.responseText;
		}
	});
}
</script>
</head>
<body class="message" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onLoad="windowOnLoad();">
<table class="message" border="0" width="100%" height="20" cellpadding="0" cellspacing="0">
<tr><td align="center" valign="middle"><!--Message--><div id='customMsg'>Last pay period:</div>.</td></tr>
</table></body></html>  


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Expert
posted Hide Post
Very nice Darryl, but it relies upon someone being able to download and use the JS framework from Prototype. A lot of companies would frown upon this.

Dan,

One method would be to modify the banner.htm file (after a back-up of course) to redirect the page to a URL. This URL could be anything, including a call to a fex with an included HTMLFORM. Probably the easiest method for you.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
Thanks everybody for the replies. I guess I should have added more detail to my original post.

Here is a simplified version of what I am trying to do...
I can use the HTML Composer to create an HTML page in the BID or in an application directory. In that HTML page I put some text that looks like "Copyright 2009". The year value in this page is not hard coded. Rather, it is coded like
!IBI.AMP.DATEYY;
. This works fine in this HTML page launched from the BID or from an application directory.

However, when I copy all the code from that page and put it in the banner.htm page in one of the C:\ibi\WebFOCUS76\worp\worp_custom\ folders the amper variable no longer resolves.

Knowing that the page works from an application directory I tried redirecting the banner.htm page to the page located in the app directory but the amper variable doesn't resolve using that method either.

The method I did not try is to call a fex with a -HTMLFORM in it from inside the banner.htm file. I'll give that a shot a post an update.

Regards,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Dan,

Despite what I wrote above Wink I always maintain that the best tool for the job should be used and in this case it is not necessarily WebFOCUS. You have an HTML page and it is served direct from the web server (logical Captain) withou being pushed through any other application etc. so rather than introduce additional components just stick to HTML. Use javascript to populate the items you require, either self contained or using AJAX methology or ASP/JSP if you want data content.

Keep it simple as possible, but no simpler as Susannah likes to quote!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Dan, I imagine your HTML page is more complex than simply placing the current year in text to be displayed, but here's some minimal HTML and JavaScript to do that:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Test 1</title>
</head>

<body>
<div>Copyright <script type="text/javascript">document.write(new Date().getYear());</script></div>
</body>
</html>


I do have a question regarding the Developer Studio HTML Composer, how do you "use the HTML Composer to create an HTML page in the BID"? I see no BID components in Developer Studio.

Thank you,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Daryl's way is the cooler way of auto-editing the message.html in the appropriate worp_custom directory.
What we had done is have report caster just slam an entire rewrite of the message.html, hardcoding a fresh message every day.
Sledge hammer way to do it, Daryl's way is way cooler. thanks D.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Guru
posted Hide Post
quote:
Originally posted by Francis Mariani:
I do have a question regarding the Developer Studio HTML Composer, how do you "use the HTML Composer to create an HTML page in the BID"? I see no BID components in Developer Studio.


Francis,

I guess I should have used the term MRE rather than BID. What I meant was that when you are in a MR Domain and one of its folders DevStudio knows to put in all the neccesary IBIMR_ stuff in the HTML page to make it work properly from the MRE. As opposed to an HTML page created in an APP folder that does not require the IBIMR_ stuff.

Since our delivery mechanism is the BID and the MRE is the repository for all our applications I tend to (incorrectly) use those acronyms interchangeably.

Thanks,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Thanks for clarifying your misleading comments.

Have you found a solution yet?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Hi Francis,

No I haven't found a solution yet. I tried several things today but none worked properly. I think what is happening is that the banner.html file is 'wrapped' inside worp_banner.js which itself is 'wrapped' in worp_layout.js. I think that explains why my variables are resolved when I run the HTML file by itself but when it is inside the entire banner structure something else is going on. When I redirect the banner.html file to anything outside its normal environment it changes the presentation of the worp_toolbar. Most likely because it can't find the style sheet and the other supporting files.

As indicated by the responses above, if I stick to strictly javascript functions I'll be OK. However, I'm trying to make use of several WebFOCUS global and system variables.

I'll poke around in the worp_banner.js file and see if I can call the html portion from in there.

Thanks again!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Display variable in banner area or message of the day

Copyright © 1996-2020 Information Builders