Focal Point
[CLOSED] Portal Title or ID in a variable that a fex can read

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6967083376

November 03, 2014, 04:04 PM
Francis Mariani
[CLOSED] Portal Title or ID in a variable that a fex can read
In this new world of WebFOCUS 8, does anyone know what to add to the Admin Console Custom Settings to pass the B.I. Portal ID or title?

This did not work in WebFOCUS 7.7.05 - there was no way to determine which B.I. Dashboard page a fex was run from.

I'm hoping this deficiency is corrected in WebFOCUS 8.

Thanks.

This message has been edited. Last edited by: Francis Mariani,


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
November 04, 2014, 08:22 AM
Sander L
Hi Francis,
It would be very awesome to have such passable parameter to set. So your question gave me some ideas where I could also use portal name. Solution I came up would be catch it on dashboard/launch page with Javascript like this:

 
function catchTitle(){
  var name = parent.document.title; alert(name);}  


and then use javascript to populate some hidden field on HTML page. After that you can assign that hidden field value to what ever parameter and send to fex.

Regards,


Webfocus 8
November 04, 2014, 09:55 AM
Francis Mariani
In WebFOCUS 5.* and 7.* I have asked, pleaded and opened cases to have the BID View Id as a parameter. On Feb 6, Tech Support wrote: "The issue should of been addressed under WebFOCUS 77 as well but perhaps something got broken between the releases. If you like I can certainly submit your case to programming as a bug again." Then later this: "I believe you specifically want to expose the Portal name to be used in WF 8x. This can be done, but there are certain restrictions. It only works in the Portal itself, and it may not be supported post 8009. The reason is that the back end portal code may evolve and the function might no longer work."

<script type="text/javascript">
alert("The portal name is: " + parent.BipView.gView.getName());
</script>


This is what a BIP page source looks like. Why on earth aren't the variables that are passed to the JSP made available as parameters? &ViewID, &ViewName, &ViewTitle, &SessionTimeout This ought to be really simple for real software developers to do.

<!DOCTYPE html>

<html>
	<head>
	    <title>BI Portal</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" >		
		<meta http-equiv="MsThemeCompatible" content="yes">
		<meta http-equiv="ImageToolBar" content="no">
		<link type="text/css" rel="StyleSheet" href="/ibi_apps/bindows/css/bimain.css">
		<script type="text/javascript" src="/ibi_apps/bindows/js/application.js"></script>
	</head>
	<body>
		<script type="text/javascript">application.start("/ibi_apps/bindows", "/ibi_apps/tools/portal/resources/markup/wfbiportalrun.jsp?&ViewID=VR-HZVKEEML10Z5KRQPS1176&ViewName=Treasury&ViewTitle=Treasury&SessionTimeout=7200000")</script>
	</body>
</html>



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
November 04, 2014, 10:23 AM
MattC
This doesn't give you what you want, but if you don't know, this is good to keep in your toolbox.

It has all kinds of calls that you can do to your environment.

http://localhost/ibi_apps/WFServlet?IBFS1_action=TEST


WebFOCUS 8.1.05
November 04, 2014, 10:36 AM
Tom Flynn
Hi Francis,
Can you query your WF8 tables and run it via your Custom Settings, create your own ampere variables and bring them in?

Tables should be like these unless renamed:
wf_grpdomtb.mas
wf_mrdomains.mas
wf_mrgroups.mas
wf_mrroles.mas
wf_mrusers.mas

Not tested, just an idea/thought...
Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
November 04, 2014, 10:49 AM
Francis Mariani
MattC, thanks for that link - it looks very interesting. Found any documentation on this?

Tom, I've never seen these tables before. My guess is these masters are custom built to read the WF 7 and older MRE user.htm file. THis has changed completely in WF 8. In any case, this information will not tell me which BIP I'm currently in.


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
November 04, 2014, 10:56 AM
MattC
Find documentation........? NO

Folks at IBI turned me on to it in the early stages of my WF 8 upgrade. Used it a lot to test out my LDAP configs.


WebFOCUS 8.1.05
November 04, 2014, 11:14 AM
Francis Mariani
Perhaps adding an “exit” to the JSP file wfbiportalrun.jsp that creates a cookie containing &ViewID, &ViewName, &ViewTitle is a solution?


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
November 05, 2014, 01:18 AM
SSander
quote:
Originally posted by MattC:
Find documentation........? NO

Folks at IBI turned me on to it in the early stages of my WF 8 upgrade. Used it a lot to test out my LDAP configs.

http://infocenter.ibi.com/wf80...Fsource%2Fopener.htm

Its the REST testpage. Also I have seen document describing all the calls on that page.


Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
November 05, 2014, 09:54 AM
Francis Mariani
quote:
The REST architectural style was developed in parallel with HTTP Version 1.1, based on the existing design of HTTP Version 1.0. The largest implementation of a system conforming to the REST architectural style is the World Wide Web. REST exemplifies how the architecture of the web emerged by characterizing and constraining the macro-interactions of the four components of the web, namely origin servers, gateways, proxies and clients, without imposing limitations on the individual participants. As such, REST essentially governs the proper behavior of participants.
This cannot have been written by someone at Information builders. Neither does it make any sense, or is it too early in the morning?

"essentially governs the proper behavior of participants" I thought this is the task of the Thought Police...


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
November 12, 2014, 09:00 AM
SSander
I dont know if you have solved it or not, but my workaround is following:

I created HTML what catches portal name ( could be what ever variable can be caught with javascript/jquery) and store them in the hidden input fields. After everything is store in the hidden fields I execute procedure where I convert all the parametervalues to global parameter values and then they are ready to use where ever.

Trick here is that I call this HTML on portal banner area, while its hidden or 1x1 size.

For html use the onInitialUpdate function to set parameters:


 
function onInitialUpdate(){

var Display =  parent.BipView.gView.getName();
document.getElementById('inputhidden1').value = Display;
}
 



Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
November 12, 2014, 11:15 AM
Francis Mariani
SSander - that's nice! I'll see if we can use this.

Thanks very much,


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
December 08, 2014, 11:01 AM
Francis Mariani
One of my colleagues came up with this JS, which can be used in BIP pages directly and also in HTML pages launched from a hyperlink located somewhere in the BIP.

        // Capture BIP Name and Title
        var w = (window.opener) ? window.opener.top : window.top;
        if(w.hasOwnProperty('NewPageViewName'))
        {
            pBipName  = w.NewPageViewName;
            pBipTitle = w.NewPageViewTitle;
        }



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