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] HTML Composer - Populate listbox from holdfile

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Closed] HTML Composer - Populate listbox from holdfile
 Login/Join
 
Gold member
posted
Hi,
I am looking for solution for following problem I have. We are running SQL reportsand catching results to holds in FOCCACHE and after that we designs those results into dashboards. As the list box / radio button values are different from each user - we need to populate list boxes from those holds too.

So I did some research and found such cool JS event as :
IbComposer_populateDynamicCtrl('listboxID');
but I would like to execute this function after the report is done with loading.(right now I have button that executes the function, but this is not nice design for end users).

Has anyone else ran into such problem or maybe can give some other ideas how to solve this.

Regards,
Sander

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


Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
 
Posts: 89 | Registered: November 19, 2013Report This Post
Master
posted Hide Post
SSander,

welcome to the forum.

You can use basic composer functionality to dynamicaly populate controls. You don't need to do it yourself with .js.

...all above assuming it hasn't drastically changed between WF 7 and 8.

G'luck,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Gold member
posted Hide Post
Hi Dave,
This is not that easy Wink

I made following example based on my code:
STATE FOCCACHE/CARHOLD.ftm
-IF &EXITRC EQ 0 THEN GOTO SKIPSQL ELSE GOTO RUNSQL;
-RUNSQL
-* Prepare hold!
TABLE FILE CAR
PRINT 
     CAR.ORIGIN.COUNTRY
     CAR.COMP.CAR
     CAR.CARREC.MODEL
     CAR.BODY.BODYTYPE
     CAR.BODY.SEATS
     CAR.BODY.DEALER_COST
     CAR.BODY.RETAIL_COST
     CAR.BODY.SALES
     CAR.SPECS.LENGTH
     CAR.SPECS.WIDTH
     CAR.SPECS.HEIGHT
     CAR.SPECS.WEIGHT
     CAR.SPECS.WHEELBASE
     CAR.SPECS.FUEL_CAP
     CAR.SPECS.BHP
     CAR.SPECS.RPM
     CAR.SPECS.MPG
     CAR.SPECS.ACCEL
     CAR.WARANT.WARRANTY
     CAR.EQUIP.STANDARD
ON TABLE HOLD AS FOCCACHE/CARHOLD FORMAT ALPHA
END
-SKIPSQL
TABLE FILE CARHOLD
SUM 
     CARHOLD.CARHOLD.DEALER_COST
BY  CARHOLD.CARHOLD.COUNTRY
BY  CARHOLD.CARHOLD.CAR
WHERE ( CARHOLD.CARHOLD.COUNTRY EQ '&COUNTRY.(FIND CARHOLD.CARHOLD.COUNTRY,CARHOLD.CARHOLD.COUNTRY IN carhold).COUNTRY:.' ) AND ( CARHOLD.CARHOLD.CAR EQ '&CAR.(FIND CARHOLD.CARHOLD.CAR,CARHOLD.CARHOLD.CAR IN carhold).CAR:.' );
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END

As you can see I will skip rerunning the SQL when users make such changes what do not need the database request. But now when I reference this to HTML and create controls to populated from "CARHOLD" file, they will stay empty if the "FOCCACHE" holdfile does not exist. So I am looking for solution maybe some kind of event after the initial run is done - so I could call the JS function to repopulate the list boxes.

Regards,
Sander


Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
 
Posts: 89 | Registered: November 19, 2013Report This Post
Master
posted Hide Post
Ah, yeah.

That's a problem.

We've got a similar construction. ( but with a difference technique ).

-IF &TMPHLDSTS.EXIST NE 0 THEN L_THE_END;

----query here

-SET &TMPHLDSTS = 'J' ;
-L_THE_END


( for other reasons, but it's about the same ;-)



Foccache is, afaik, based on Session. And those populating queries seem to run in an seperate session...

....nasty stuff. I'm afraid I can't help you futher.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
They only appear to be because by default the HTML generated from HTMLComposer doesn't have FOCCACHE in its path.

If you edit the HTML and add foccache to the attribute-lists for attribute ibiapp_app, the HTML can find them. There's at least one hidden input-field with "ibiapp_app" as id and there are some data_info fields containing the same info (violating the DRY principle, but that's modern thinking).

Unfortunately, on re-opening the HTML in HTMLComposer, that tool still doesn't look in the (manually added) foccache directory and will overwrite those entries again on opening the HTML. So you'll have to apply those changes again each time before you save.

At least, that is how the situation seems to be since about WF7.6.10. I don't know how this behaves (or is supposed to behave) in WF8, but I don't expect a lot of differences.


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
Guru
posted Hide Post
You could do something like this in your fex:
 
ON TABLE HOLD AS MYREPORT FORMAT HTML
...

-HTMLFORM BEGIN
<html>
<body onload="parent.IbComposer_populateDynamicCtrl('listboxID');">
!IBI.FIL.MYREPORT;
</body>
</html>
-HTMLFORM END
 


If that doesn't quite work then have a function in the html page and replace the body onload to call that function:

 
<body onload="parent.myfunction();">
 


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Gold member
posted Hide Post
So after some more research I still solved this with JavaScript/JQuery - so I am checking the event after iframe load to repopulate listboxes.


Release: WebFOCUS 8104, AppStudio: 8105
OS: Windows
Output: HTML,Excel,Active Reports
 
Posts: 89 | Registered: November 19, 2013Report This Post
Gold member
posted Hide Post
Hi SSander

Open a case in tech support for this issue I am sure that we can help you. You can ask for Barry when you open the case.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
 
Posts: 80 | Location: NYC | Registered: November 13, 2008Report 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] HTML Composer - Populate listbox from holdfile

Copyright © 1996-2020 Information Builders