Focal Point
[SOLVED]DS HTML Composter: How to add a Defer button to an existing html launch page?

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

October 21, 2011, 04:21 PM
Francis Mariani
[SOLVED]DS HTML Composter: How to add a Defer button to an existing html launch page?
I can't figure out how to add a Run Defer button to an existing html launch page. Any ideas?

(Mod: changed the word "can" to "can't"!!!)

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
October 21, 2011, 04:24 PM
njsden
Create a brand new page, copy/paste the "behind the scenes" code generated by HTMl composer for the 'Run Defer' control into the old page and adjust parameters accordingly ...

I know how much you hate hacking into code though Wink



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
October 21, 2011, 04:47 PM
njsden
This is what I managed to find about the "Run Deferred" button:

...
<INPUT style="BACKGROUND-IMAGE: url(htmlpathsub/javaassist/ibi/html/describe/defer.gif); Z-INDEX: 8; POSITION: absolute; 
BACKGROUND-COLOR: lavender; WIDTH: 38px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 22px; TOP: 83px; LEFT: 48px" 
id=form1Defer tabIndex=7 onclick="OnExecute(this);return false;" value=" " type=button requests_list="1" name="button2">
...


Other than style (which includes Z-INDEX), I think requests_list, name and tabIndex are to be adjusted.

requests_list="1" in my sample page has this code further ahead in the .htm file:

<requestid id="1"></requestid>


There's nothing really there but it's better to leave it. If I delete the Run Defer button, the requestId tag also gets removed.

The weird part is that I could not find anything else in the page that would hint WF to know that OnExecute() should start a "Run Defer" action as the "Run Schedule" button does exactly the same ... unless the javascript API is "smart" enough to make decisions based on the control name (form1Defer vs. form1Schedule in this case).

I don't think this helps much but it's the best I could see.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
October 21, 2011, 04:56 PM
Francis Mariani
Neftali, this might help me. I was afraid I may miss something if I hacked the code because of what might be lurking past the HTML input tag...

I'll give it a try.

Thanks,


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
October 21, 2011, 05:02 PM
njsden
I know what you mean. I'm usually "brave" when creating pages from scratch (and that's a lot to say) but editing existing ones is a whole different beast to tame!

Just don't forget to make at least 3 backup copies before ... you know Wink

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
October 23, 2011, 04:54 PM
Waz
I would have thought that all you need to run deferred is to have a object called IBIMR_defer, and set it to "defer".

But I don't use composter.


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!

October 24, 2011, 09:24 AM
Francis Mariani
quote:
IBIMR_defer

I'll be trying this now, as this is what we used to do back in the days of beautiful, hand-tooled code.


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
October 24, 2011, 10:39 AM
Francis Mariani
OK, I've figured this out. As per the old fashioned technique, I created a hidden text field called IBIMR_defer. Then I added a new button that sets the text field to "defer", submits the report fex and sets the text field back to blank. I had to also "bind" a report parameter called IBIMR_defer.

Now I neeed to replicate this in 9 other HTML files.

I isolated the code and this is what I have to copy:

JS:
//Begin function button13_onclick
function button13_onclick(ctrl) {
// TODO: Add your event handler code here
document.getElementById('IBIMR_defer').value = 'defer';
OnExecute(ctrl)
document.getElementById('IBIMR_defer').value = '';
}
//End function button13_onclick

HTML field and button:
<INPUT style="Z-INDEX: 190; POSITION: absolute; WIDTH: 90px; HEIGHT: 20px; TOP: 40px; LEFT: 690px" 
id=button13 language=javascript tabIndex=184 onclick=button13_onclick(this) value=Defer 
type=button autoExecute="false" requests_list="21" name="button13"></SPAN> 
<INPUT style="Z-INDEX: 189; POSITION: absolute; WIDTH: 80px; DISPLAY: none; HEIGHT: 20px; TOP: 58px; LEFT: 700px" 
id=IBIMR_defer tabIndex=183 value=" " defaultselection="1" persistentuniqueid="compUid_393" name="IBIMR_defer"></SPAN> 


At the very bottom:
<request requestid="21" sourcetype="typeFex" targettype="window" targetname="wf_defer" ibif_ex="app/summary1.fex"
IBIMR_domain="mrdom001/mrdom001.htm" IBIMR_folder="#summaryrepor" IBIMR_sub_action="MR_STD_REPORT" activereport="0"
reportcolumns="" reportrealcolumns="" ibiapp_app=""></request></requests></rootxmlnode></script>

The unfortunate part of looking at the code is that the "bound" report parameters generate an overdose of code that I'm afraid to paste into the HTML file (for instance, why are there 'slider_range_from' and 'slider_range_to' tags for a hidden text field?):
<requestid id="21"></requestid></variable>
			
<variable controltype="7" parametercreatedinreslay="0" type="default" desc="IBIMR_defer" name="IBIMR_defer" default=" " 
textvarname="" accept="0" select="0" create="1" top="250" left="360" width="60" height="20" inbinding="1">
				
<link linktype="default" from="compUid_393">
					
<condition default="1" name="Default" whattodowithcontrol="4" valuescompareoperator="0" parameterscompareoperator="0"
conditionmultiselectoperator="0">
						
<data_info checkForDuplicateValues="0" displayfield="IBIMR_defer" datafield="IBIMR_defer" datasource="&data_view.mas"
datatype="0" selectedvalue=" " operation="" slider_range_from="" slider_range_to="" previewvalue=" " sourcetype="typeMaster">
							
<static_values>
								
<static value=" " display=" " selected="1" noinput="0"></static></static_values></data_info></condition></link>



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
October 24, 2011, 05:21 PM
Francis Mariani
I decided to be a good boy and follow orders by doing it using the GUI - I only copy-pasted the JavaScript lines.


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
October 24, 2011, 05:29 PM
Waz
Oh how the great have fallen.

Music


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!

October 25, 2011, 12:47 PM
David Glick
There is no need for any manual coding or copy/pasting. If you right-click the form, there is an option on the context menu to Add a Defer button.

If you don't have a form, you create a button, and then right-click it to invoke the Hyperlink Properties and set a hyperlink to use an external procedure (your report), and then from the Target column, select Defer.

That's it...


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
October 25, 2011, 04:41 PM
Waz
quote:
right-click the form


Who'd a thunk it ?

Big Grin


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!

October 25, 2011, 06:50 PM
njsden
quote:
Who'd a thunk it ?

Agreed! The funny part is that when playing with this I right-clicked the report to "Refresh parameters" and even the "Submit" button to get to "Hyperlink properties" to see if an option to include the "Run Defer" button was offered. It just never occurred to me to right-click the actual form ...

quote:
be a good boy and follow orders by doing it using the GUI

Perhaps I should do as Francis ... who knows, I may start finding pleasant surprises within the realm of the GUI Razzer



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
October 25, 2011, 06:58 PM
Waz
There is always hope.


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!

December 09, 2011, 06:20 PM
Francis Mariani
Solved!

Somehow I missed David's solution.

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
April 04, 2012, 02:47 PM
Kafka
Hi Francis,
This is Lee Martin. I am trying to do the same thing being talked about here and was only partially successful. I am able to copy a self_service htm file into MRE, add the deferred button and it submits a report deferred. But I'm unable yet to pass the parms collected from the htm page. It just calls the .fex and "autoprompts". What am I missing as far as passing the parms to the .fex using the Deferred button? Any help would be much appreciated. Thanks.


7.7.06