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     fex not refreshing unless we do manualy refresh in the browser

Read-Only Read-Only Topic
Go
Search
Notify
Tools
fex not refreshing unless we do manualy refresh in the browser
 Login/Join
 
Gold member
posted
Hi All,
I am facing a very strange problem as described below,Please be patient enough to read till the end and help me please....

I have 3 fex and one htm file. First fex will be used to list all the values from a table ,REPORT_TABLE.I have an Edit link which I defined and 2nd report will be called from link

1) dashbord.fex(First FEX , works as a dashbord)

DEFINE FILE REPORT_TABLE ADD
New/A20V='New';
END

TABLE FILE REPORT_TABLE
PRINT
Edit AS ''
ID/I3 AS 'Report ID'
NAME AS 'Report Title'
DESCRIPTION AS 'Description'
REPORT_URL AS 'Help Url'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
---- ----
---- ----
---- ----
---- ----
TYPE=DATA,
COLUMN=N1,
TARGET='_blank',
FOCEXEC=rep_edit(RPTID=N2),
$

2) Main code from rep_edit.fex

TABLE FILE REPORT_TABLE
PRINT
NAME
REPORT_URL
DESCRIPTION
BUSINESS_OWNER
TECH_OWNER
REPORT_HELP
WHERE ID EQ &RPTID
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
END
-RUN
-READ HOLD1 &DUMMY1.A6. &VNAME.A100. &DUMMY1.A6. &VURL.A50. &DUMMY1.A6. &VDESC.A500. &DUMMY1.A6. &VBUSOWN.A50. &DUMMY1.A6. &VTECHOWN.A50. &DUMMY1.A6. &VHELP.A500.

Populating this variable values in respective textbox/textareas which is created in "-HTMLFORM BEGIN" and "-HTMLFORM END".Now user can edit any value and press submit button. On click of submit I have another fex which will store the edited values in the database table

Button click logic as below.













---- ----
---- ----

3) Main code in sbmt.fex is as below,

ENGINE SQLORA SET DEFAULT_CONNECTION myconn
SQL SQLORA
EX wfpackage1.P_MANAGE_REPORTS '&RPTID','&RPTNM','&RPTDSC','&BUSCNTCT','&TECHCNTCT','&RPTURL','&RPTHLP';
END
-RUN
-ENDREPORT

if there are no errors then call the success message with a back button to dashboard

-HTMLFORM dbsaveok.htm

4) dbsaveok.htm

Main code in the Back button of dbsaveok.htm is as below,













Now the changed data can be viewed in the dashboard screen(dashbord.fex) and also the data in the database table got changed.Till now I am happy , ther are no issues...

Now my real issue come here. If I again use the Edit link to execute rep_edit.fex, it is showing me the data which was not edited (prior to my change). Now if I right click and do a refresh(manual browser refresh), amazingly It gave me refreshed data . Any idea why it is not programatically refreshed when called from the dashboard edit link?

Any suggestions?


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Gold member
posted Hide Post
Some corrections in my posting itself,

It is not "New" but "Edit" I have to define

DEFINE FILE REPORT_TABLE ADD
Edit/A20V='Edit';
END

also the button code I will paste again, because it created the object instead of the code
.

##<-* INPUT language=java_script id=button1 style="Z-INDEX: 3; LEFT: 370px; WIDTH: 90px; POSITION: absolute; TOP: 190px; HEIGHT: 30px" onclick=button1_OnClick[this) tabIndex=3 type=button value="Main Menu" name=button1 requests_list="1" autoExecute="True"--*>

-*##-*


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Virtuoso
posted Hide Post
I'm not sure if there is a fix, but the fact that WebFOCUS seems to use what is in cache has been around for a long time in my book.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
There is a simple solution. You add a dummy variable in the form that contains a random number - therefore the FEX URL will always be different and will always be re-executed.

<form name="form1" action="/ibi_apps/WFServlet"
      method="get" target="ReportWindow">
...
<input type="hidden" name="RNDM" value="">
<script>document.form.RNDM.value = Math.random();</script>
...
</form>


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
I'm thinking that this is due to the browser finding the exact URL in it's cache and then presenting you with the already recorded page.
You may get over this issue by adding a random generated number to your edit link. There are ways in WebFOCUS and in Javascript to generate a random number, and adding this to the URL will make it unique, thereby forcing the browser to request the page iso getting it out of the cache.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Thanks Gamp and Francis for your suggestion.I am still not clear how this can be implemented in my report call .

My dashboard has a link text as Edit which was added as a data element (defined) in my TABLE FILE request and later using the style of DATA i am calling my FEX for editing the value.

TYPE=DATA,
COLUMN=N1,
TARGET='_blank',
FOCEXEC=rep_edit(RPTID=N3),
$

Could you please tell me , where I can implement the logic of random number ?


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
Johney,

Basically you need to pass another variable that consists of a random number.

There are two main methods of doing this, using Dialogue Manager or use a field value. The Dialogue Manager method is probably the more efficient in I/O terms. -
-SET &Rand = RDNORM('D20')*100000;
TABLE FILE etc.
.....
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=N1, TARGET='_blank', FOCEXEC=rep_edit(RPTID=N3 Rand=&Rand), $
ENDSTYLE
END

The reason this works is that the random number makes the URL different to any previous URL and therefore does not exist in the cache, so the report is executed.

The alternative is to DEFINE or COMPUTE the value and then include it in the report with NOPRINT. This method adds the value to each row and therefore I would not recommend it but the choice is obviously yours. I only ever use the DM method for a drill down.

As Gamp and Francis have mentioned above, there is a javascript method of ensuring this within launch pages.

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
Gold member
posted Hide Post
Hi All

Tony, I had achieved the result already by using the same approach , but I passed time as a variable and it worked for me. RDNORM is totaly new for me and I have to try that too.

Smiler

Here is what I used,

-SET &VTIME = HHMMSS(VTIME);

GamP and Francis , I couldn't get correct result by trying with Javascript method.

Thank you everybody for guiding me.

Regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
 
Posts: 83 | Registered: October 19, 2007Report This Post
Expert
posted Hide Post
Johney,

If it worked they Yay for you, however the syntax you are using is not quite right as DM will not know what VTIME is. In DM you have to pass the output format, so your code should look like this -

-SET &VTIME = HHMMSS('A8');

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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     fex not refreshing unless we do manualy refresh in the browser

Copyright © 1996-2020 Information Builders