Focal Point
[CLOSED] On demand paging

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

July 21, 2010, 04:51 AM
Rahul
[CLOSED] On demand paging
I am Using On demand paging.

How to Disable following options:

1) Search option.
a) A Text Box for input
b) Find Button
c) Search Case Button
d) Search Direction
2) Help Button
3) Close Button

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


WebFOCUS 7.1.7
Windows
Excel,HTML,PDF
July 21, 2010, 06:04 PM
Waz
This doesn't look promising, I would suggest putting a case in with IBI and ask the question.

One question, why do you want to remove these options, its one of the reasons to have ODP.


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!

July 21, 2010, 06:49 PM
Darin Lee
I was just going to suggest turning off On demand paging. Big Grin


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
July 21, 2010, 07:00 PM
Waz
I've just written a report that can have well over 500 pages, and ODP is the only way to make it simple for the users to find the data they are interested in.

And its so quick.


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!

July 21, 2010, 08:56 PM
Severus.snape
Hi,

Seems like you are on 7.1.7 -- if you really want ODP only for paging and you want to remove all other features like the search option, your only option is to change the system file on the WF client - it is vcp.html in 7.1.x which resides in wfc/etc folder..but take a backup of the file. In 7.6 it is a bit different.

You can achieve pagination alone with focus code by calling the same fex file on click of a forward image..I remember seeing some posts on this.

Hope this helps

thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
July 25, 2010, 03:29 AM
Rahul
Hi,

Has anyone got success using javascript in fex files to Hide these buttons?
I had tried implementing the same but somehow it is not able to invoke the function within fex file.

The reason I want to implement in this way is that only for one report among several ODP reports this features are required to be disabled.


WebFOCUS 7.1.7
Windows
Excel,HTML,PDF
July 26, 2010, 11:06 PM
Waz
OK, have a try at this....


Create a javascript file named odp_control.js

Add this to it.

function odp_controlOnLoadFunc() {
	odp_disable = false ;
	for (_c1=0;_c1<ibiOptions.length;_c1++) {
		switch (ibiOptions[_c1]) {
		case 'odp_disable':
			odp_disable = true ;
			break ;
		}
	}
	var _Parent = window.parent ;
	var _Form   = _Parent.frames[1].document.forms["PageForm"] ;
	var _Table  = _Form.getElementsByTagName("TABLE")[0] ;
	var _Cells  = _Table.rows[0].cells ;
	for (var _c=2;_c<_Cells.length;_c++) {
		var _Cell = _Cells[_c] ;
		var _Inputs  = _Cell.getElementsByTagName('INPUT') ;
		for (var _i=0;_i<_Inputs.length;_i++) {
			disableInput(_Inputs[_i],odp_disable)
		}
		var _Anchors = _Cell.getElementsByTagName('A') ;
		for (var _i=0;_i<_Anchors.length;_i++) {
			disableAnchor(_Anchors[_i],odp_disable)
		}
	}
}
function disableInput(obj,ctrl){
	if (ctrl) {
		obj.disabled=true;
		obj.style.backgroundColor='silver';
	}
	else {
		obj.disabled=false;
		obj.style.backgroundColor='white';
	}
}
function disableAnchor(obj,ctrl){
	var href = obj.getAttribute("href");
	if(ctrl){
		if(href && href != "" && href != null){
			obj.setAttribute('href_bak', href);
		}
		obj.removeAttribute('href');
		obj.style.color="gray";
	}
	else {
		obj.setAttribute('href', obj.attributes['href_bak'].nodeValue);
		obj.style.color="blue";
	}
}


Place it somewhere available to WebFOCUS.

Here is some sample code that uses the javascript functions.
SET JSURLS = '/......./odp_control.js odp_disable'

TABLE   FILE GGSALES
 PRINT  *

ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE SET WEBVIEWER ON
ON TABLE SET WEBVIEWTARG OFF
END

-RUN


WebFOCUS auto runs the function odp_controlOnLoadFunc.

I think i've disabled the controls.

You could do a lot more with this, even change the look of the ODP controls.


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!

July 30, 2010, 10:23 AM
Brian Suter
Please be aware that reverse engineering undocumented IBI javascript code is dangerous. When adding new features or fixing bugs, we (IBI) can change how the internal functions work. When that happens you may have to change your code.

If you take this unrecommended route, please do the responsible thing:document your changes and inform your management chain that in every upgrade there needs to be a plan to test and possible adjust whatever function you tinkered with.

The best approach is to use the documented interfaces.

Thank you.


Brian Suter
VP WebFOCUS Product Development
August 01, 2010, 05:42 PM
Waz
I agee that using the documented interfaces is the best way, but when the interface is lacking in some area, that is a requirement, then other methods are needed. As you well know, requesting an NFR could take a long time or not even happen, so in the users world, sometimes these unrecommended routes are the only option to complete a task and give the users what they need.

I also agree that any custom solutions should be heavily documented and highlighted with the appropriate people.


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!