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     [CASE-OPENED] Built in function signature/definition

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-OPENED] Built in function signature/definition
 Login/Join
 
Platinum Member
posted
Hi all
I'm trying to look into signature of one of the javascript functions used in WebFOCUS - SaveSelectedParameters()

Is there a way I can lookup signatures/defintions of this (and other) javascript function that WebFOCUS HTML Painter uses?

Best Regards
Syed

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


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Virtuoso
posted Hide Post
Could you please explain a bit further what it is that you are trying to do / find out?
What exactly do you mean with signature of javascript functions?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Gamp - I am using the Save Parameters button available in MRE. Using this button, the user is able to SAVE the input parameters to her 'My Reports' folder in MRE.
However, we're facing an issue with one of the reports for which we have a very long URL (post)

To resolve this, we are trying to replace the get method used in SaveSelectedParameters() method by post method.

Please let me know if there's another way we could do this.

Thanks
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
Syed,

In v7.6.5, the function is defined in JavaScript file C:\ibi\WebFOCUS76\ibi_html\javaassist\ibi\html\js\ibirls2.js - it's probably in a similar folder in v7.1.7.

I an not sure you will be able to adapt it for method=post and I can't think of another solution.

Here's a post that will probably not be of much help: [CLOSED] Save parameter report have too long URL as the original poster never told us how or if the problem was resolved.


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
Francis - I found the function specs in the same folder as you had mentioned! Thanks much.

I was thinking of using the same function in my original HTML and modifying the content by replacing 'get' with 'post'. I'll try this and post my comments on the forum.

Once again - thanks for your help.

Rgds
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
Unfortunately, there are no "specs" and very few comment lines in the JavaScript file so there is no documentation.


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
Virtuoso
posted Hide Post
Syed,

You should be able to change most get's into post's. Be sure to make a backup of the files you intend to change first.
And also be aware of the fact that these changes will become undone whenever you upgrade or reinstall. So document your changes very well, and re-apply them after every upgrade.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Gamp - thanks for the inputs.
I have taken a backup and tried changing get to post. However, I was not able to see any changes in the 'saved' file, i.e. the saved file still shows the long URL that I wanted to get rid of.

One question - I'm trying to make these changes in the file kept in my local machine. Should it be done on the server itself?


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Virtuoso
posted Hide Post
Syed,
It should of course be done on the machine that hosts the MRE environment.
But, thinking this through, I would be surprised if it would have any influence in this case.
Since you said yourself, the saved file contains the complete URL. That means that saving parameters is not done by listing the parameters in an organized way, but apparently by storing the url in the save file. If that's the case (I have never ever looked into saving parameters at all), then changing posts to gets or vice versa will not change this behaviour.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
GamP
I agree with you on this. As you said, saveparameters() method stores the URL in the saved file, hence changing the 'get' to 'post' wouldnt have any difference.
I was also thinking of trying to override the function definition and change the behavior of URL that gets saved! Though this would be too far fetched, considering my little knowledge in javascript Sweating

Looks like this calls for opening an IBI ticket - maybe IBI could send a patch or something to get this rectified.
Moreover, I have not seen a solution for this issue in this forum. Roll Eyes

Thanks
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Gold member
posted Hide Post
Syed,

I submitted a ticket on this issue today and IBI responded that the url length limitation is an IE issue, which it is. But I think that they should redesign code using cookies or files to pass saved parameters to work around this limitation.

Maybe if more folks ask for it????


WebFOCUS 769
Windows
all
 
Posts: 53 | Registered: April 29, 2009Report This Post
Platinum Member
posted Hide Post
Knegrotto - I agree with you! We are planning to reduce the size of the parameter names in order to reduce the overall size of the URL.
This could be a considerable effort on our part!

Have you opened a case?


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
All - the issue has been brought to the notice of IBI. They are working on it and will revert to me with a possible resolution. I shall update this post with the response that I get from IBI.

Thanks


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
I wonder if there is a solution to this madness?


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
I believe they have come up with a solution for this in 7.6.x... not sure, but I read in one of the posts somewhere (can't remember where !)..

So you know, we had to get rid of 'Save Template' buttons on our reports as they did not work in case the URL is long. What a waste of a feature that could have been useful to end users !


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
Something that I have done before is to read the entire DOM and then accumulate anything with a NAME attribute into a parameter list which I then pass to a fex to write all the values to another fex.

Something like this -
  var parmlist = "";
  for (i=0;i<document.all.length;i++) {
    if (document.all(i).name) {
      ctrl = document.all(i).id;
      ctrlname = document.all(i).name;
      ctrlvalue = document.all(i).value;
      if (ctrlname!=undefined && ctrlvalue!=undefined && ctrlvalue!="FOC_NONE" && ctrlvalue!="" && ctrl!="IBIAPP_app") {
        parmlist += "-SET &" + ctrlname + "='" + ctrlvalue + "';%0d%0a";
      }
    }
  }
  alert(parmlist);

You might have to validate the control's value for alpha etc. so that the -SET commands are correct, but you could write this off to a file in a users folder and then append a -INCLUDE fexname to allow the process to execute.

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
Syed,

I had the need to save selected parameters at the click of a control on a launch page. My solution is:

Create one extra Parameter, "SAVEPARM" for example.
My "Save Parameters" button has an onClick event handler that does this:

- Sets the SAVEPARM parm to "SAVE"
- Calls the regular OnExecute function
- Sets the SAVEPARM parm to blank

The regular OnExecute function calls the report program as normal. The report program detects it's called with SAVEPARM set to "SAVE" and goes to (-GOTO) a SAVEREPORT label that collects and saves the parameters using WebFOCUS and SQL passthru.

With this method, you do not have to figure out a way collect the parameters using JS, or worry about GET/POST, you're using the normal behaviour of the launch page, with one extra parameter to determine 'run report' or 'save report parms'.

    document.getElementById('inputhidden1').value = 'SAVE';

    OnExecute(document.getElementById('form2'))

    document.getElementById('edit1').value = '';
    document.getElementById('inputhidden1').value = '';

inputhidden1 is the hidden control for my parameter SAVEPARM.
edit1 is the textbox control for the name of the Saved Parameters.


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
Virtuoso
posted Hide Post
quote:
Originally posted by knegrotto:
I submitted a ticket on this issue today and IBI responded that the url length limitation is an IE issue, which it is.


If the issue is with the URL being longer than 1024 characters, then it's NOT an IE issue, but an IBI issue. They're ignoring specifications.
URL's are not designed to be longer than 1024 characters. Many browsers accept longer URL's, but where they put their limits is entirely up to them (provided it's past those 1024 chars, of course).

If you need to send more data than fits into an URL, you're supposed to use the POST method instead of the GET method.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Francis - that is a good way to work around the Save parameters option! Thanks for sharing.
I'm assuming that once the report is launched again, the SAVEPARM parameter picks up the params and displays them on the report as default params.

I'd give it a try sometime !

Rgds
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Gold member
posted Hide Post
Hi Fransis,
We are also trying to write a custom process for Save parameters stuff. Would you Please share the deatiled code behind the sample Fex, launch page.

Thanks,
DD.


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Virtuoso
posted Hide Post
Another option is to store the saved parameters in browser-cookies. We do that for a number of WebFOCUS reports. The approach is similar to what Francis outlined, but you won't need the extra hidden field and everything is done in Javascript, it's all client-side.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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     [CASE-OPENED] Built in function signature/definition

Copyright © 1996-2020 Information Builders