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     [CLOSED] BID name in banner?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] BID name in banner?
 Login/Join
 
Platinum Member
posted
I have a custom dashboard template I've created that I intend to use several times. Is there any way to grab the description of the specific dashboard view and dynamically put it in the banner?

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


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
I don't see any easy way to do this.

If there was a way to get the value of WORP_MPV and dynamically use that to choose a banner it would meet your needs.

However, in looking through the folder structure and the files that make up the templates/views I can not see any direct reference to WebFOCUS Variables being substituted.

The closest thing I see is:
<!--Links-->
and
<!--Message-->


If I have time I'll play with this more and see what I can find out. However, those look like flags for a substitution of data.

If you can figure out what criteria can be substituted there it might be possible to load a value you can use some JavaScript to detect and load the appropriate banner.

Its a long shot, but its all I see with quickly looking at things.

Thanks,
Doug Logan


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Platinum Member
posted Hide Post
I don't see anything out of the box either, so it's probably going to require modification of the JSPs in the WORP folder under WEBAPPS.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
Except I'm not looking to read it from WF. This would be done via the webapp and jsp, I'm thinking. That's the code that displays the dashboard view in the first place. I was thinking maybe the file:
WebFOCUS76\webapps\webfocus76\worp\jsp\banner\WORP_Banner.jsp


This file creates the links, etc that show in the banner, and I'm wondering if there's a method/function in the worp classes that would give me access to the dashboard description.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
MacLongHorn,
Ah, that is the secret.

Add the following to the top of WORP_banner.jsp
  String WORP_MPV = worpBannerBlock.getUserPrefs().getMpv();


e.g.
<jsp:useBean id="worpBannerBlock" scope="request" type="ibi.worp.client.banner.WORP_BannerBlock"/>
<%
  final String JAVASCRIPT_PREFIX = "javascript:";
  int bannerLinksCount = 0;
  String WORP_MPV = worpBannerBlock.getUserPrefs().getMpv();


You can then output the Group View using the following code:
<%=WORP_MPV%>


That can be inserted anywhere within the HTML.

I'm using Firebug on the JavaScript now to see if I can see exactly what is loading/setting the image in the background.

Thanks,
Doug Logan


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Platinum Member
posted Hide Post
Ok, I got it :-).

So in addition to my modifications above, add something like the following to the HEAD block of WORP_banner.jsp

    <script language="JavaScript" type="text/JavaScript">
      function changeLogo(){
        var imgLogo = document.getElementById("Company Logo");
        var MPV = "<%=WORP_MPV%>";
        
        if (MPV == "public") {
          imgLogo.src = imgLogo.src.replace("logo", "4_3");
        } else {
          imgLogo.src = imgLogo.src.replace("logo", "4_1");
        }
        alert(MPV);
      }
    </script> 


Then change the following line:
<body LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" onload="javascript:decideToShowOrHideLanguageHref();" onunload="javascript:closeAllOpenedWindows();">
  


To the following:
<body LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" onload="javascript:decideToShowOrHideLanguageHref();changeLogo();" onunload="javascript:closeAllOpenedWindows();">


Wallah, the logo dynamically changes depending on the group view :-).

Based on the URL used for the WORP image:
/ibi_apps/Controller?WORP_REQUEST_TYPE=WORP_GET_FILE&FILE_NAME=worp_custom/aa_gbv/logo.gif


It also seems you might be able to create a folder under:
/ibi/WebFOCUS76/worp/

Called "logos" and do something like this:
    <script language="JavaScript" type="text/JavaScript">
      function changeLogo(){
        var imgLogo = document.getElementById("Company Logo");
        var MPV = "<%=WORP_MPV%>";
        imgLogo.src = "/ibi_apps/Controller?WORP_REQUEST_TYPE=WORP_GET_FILE&FILE_NAME=logos/<%=WORP_MPV%>.jpg";
      }
    </script>  


I have not tested this last bit though...

Thanks,
Doug Logan


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Expert
posted Hide Post
Why logos? The View Name is a piece of text.


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
Platinum Member
posted Hide Post
Ok, that last bit of code I had did not work, but the following does:

    <script language="JavaScript" type="text/JavaScript">
        function changeLogo(){
          var imgLogo = document.getElementById("Company Logo");
          var MPV = "<%=WORP_MPV%>";
          imgLogo.src = "/ibi_apps/Controller?WORP_REQUEST_TYPE=WORP_GET_FILE&FILE_NAME=worp_custom/logos/" + MPV + ".jpg";
        }
    </script>  


It does appear it restricts the link to "work_custom" (which is actually good from a security standpoint).

Thanks,
Doug Logan


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Platinum Member
posted Hide Post
ah yes, that's the type of thing I thought might do it. let me give that a try. thanks all.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
except
 getUserPrefs().getMpv() 
returns the folder name, not the "nice" description one would see in the BID View Builder, such as "Executive Information Portal"


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
Mac,
Sorry, but the "description" value does not appear to be easily attainable. Its not within any of the classes/info presently being used by WORP_banner.

Thanks,
Doug Logan


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Expert
posted Hide Post
Is this not because the only location the view name is stored is in C:\ibi\WebFOCUS76\worp\conf\mpv.xml and in some kind of encrypted manner?

        <BLOCK
            Description="1aa0e0ef7edc568364cef2dG2ca6cda7c42b11f0180Gfdf0"
            Folder="af_gbv" GroupName="salesgroup"
            GroupTitle="1aa0e0ef7edc56834d49b18d29d2e8f88f76e65b2b078f9a"
            Name="af_gbv" dualLogin="no" redirectId="af_gbv"/>


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
Platinum Member
posted Hide Post
probably so. i found this in the WORP_Views.jsp:
        <jsp:useBean id="worpBlock" scope="page" type="ibi.worp.xml.WORP_Block"/>
        <tr>
          <td class="anchor1">
            <control:conditional condition="<%=isMPVRequest%>">
              <a class="anchor1" href="<%=MessageFormat.format(baseHref, new Object[] { worpBlock.getName() } )%>" target="_parent"><%=worpBlock.getDescriptionDecrypted()%></a>


So I'm currently trying to plug this code into WORP_Banner.jsp somehow, but I keep getting an error.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
Mark,
The method for returning this value (getDescryptionDecrypted) does not appear to exist under a banner object, and does not seem to be easily accessible to the banner object as best as I can tell.
I'll probably play with this more later, but I was not able to find an easy way to do this.

Thanks,
Doug Logan


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Platinum Member
posted Hide Post
How do you know? Where can I find the classes/methods available?


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
Mark,
If you take a look at the code within the JSP, you can see that the banner is of a different object type then what is used decrypt and get a copy of the description.
If you run searches throughout the JSP's you will see that the banner object type never carries a reference to something that describes the WORP view description.

Thanks,
Doug Logan


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Expert
posted Hide Post
Mark, it appears to me that nothing is documented, probably because we're not supposed to play around with any of this.


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
quote:
Wallah,
???? Did you mean "voila"?

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
OOH, I was so tempted to ask the same!


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
Platinum Member
posted Hide Post
quote:
Wallah


:-P

I guess this is not what I meant:
http://dictionary.reference.com/browse/wallah

So... yes... voila...
http://dictionary.reference.com/browse/voila

I guess that is what happens when you only ever hear a word spoken.

quote:
Mark, it appears to me that nothing is documented, probably because we're not supposed to play around with any of this.


Francis,
Yes, I'd say that is exactly the case. This is not meant to be played with.

Thanks,
Doug Logan


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 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     [CLOSED] BID name in banner?

Copyright © 1996-2020 Information Builders