3 Attachment(s)
Problem with custom forward navigation after update to final version of DF19.1
Hi all,
I have a basic mobile webapp I made to test the framework. In Alpha, Beta and RC version, all works fine using the sample of custom forward navigation provided in WebOrderMobile. But, after uninstall the RC version, rebooted, and installed the last DF 19.1, the navigation does not work anymore.
Looking in the sample WebOrderMobile, the same error occurs.
To reproduce it, select an order, click in "Edit", click in "Add Line" to add another order item.
Debugging, I saw the program passing twice on ShowView_Exec procedure when doing the custom forward navigation. In the firt time, the property phoCurrentShowView has the same value as hoView (in this sample, 509 - oSelectInventory). All fine. In the second time, the value of phoCurrentShowView is 0, and the hoView is 584 (oZoomOrderDetail, that has navigated forward to oSelectinventory). The same occurs in my phisical machine or in a new VM.
Attached, prints illustrating the problem.
I have searched in the forum for previous relates of this problem, but can't found. Sorry if this is a duplicated question/report.
Tests:
Phisical Machine running Windows 10 Enterprise (comp. 17763.437) and DataFlex Studio Build 19.1.61.138
Virtual Machine ruinning Windows 7 Pro SP1 (comp. 7601) and DataFlex Studio Build 19.1.61.138
Thanks in advance.
[ATTACH=CONFIG]12758[/ATTACH][ATTACH=CONFIG]12759[/ATTACH][ATTACH=CONFIG]12760[/ATTACH]
Re: Problem with custom forward navigation after update to final version of DF19.1
Hi Adriano,
I can reproduce this and this is indeed caused by late changes in 19.1. This happens when a 'double navigation' is performed. In the WebOrderMobile this is done by calling Navigate from within OnNavigate of the oZoomOrderDetail view.
Try including the folowing code in your project (after inclusion of cWebApp.pkg/AllWebAppPackages.pkg):
[code]
// BUGFIX for double navigation bug (HW, 2019/04/30)
#IF (!@=191)
// Actually shows the view by sending doShow and performing the renderView client action.
//
// - hoView Handle of the view object to the be shown.
// - bStandalone If true this is a standalone view (oWebApp.displayView(..)) and not
// rendered by renderview.
{ Visibility=Private }
Procedure ShowView_Exec for cWebApp Handle hoView Boolean bStandalone
String[] aParams
String sView
Handle hoInvokingView
// Check if the showview is not overriden by a different ShowView call inside OnNavigateForward, phoCurrentShowView should be set before this function is called
If (phoCurrentShowView(Self) = hoView or (phoCurrentShowView(Self) <> C_WebUnresolvedObject and IsObjectOfClass(phoCurrentShowView(Self), RefClass(cWebModalDialog)))) Begin
Send DoShow of hoView
If (not(bStandalone)) Begin
Get WebObjectName of hoView to sView
Move sView to aParams[0]
Send ClientAction "renderView" aParams
End
Set phoCurrentShowView to C_WebUnresolvedObject
End
End_Procedure
#ENDIF
[/code]
Re: Problem with custom forward navigation after update to final version of DF19.1
Hi, Harm.
That solved the problem.
Thanks.
Re: Problem with custom forward navigation after update to final version of DF19.1
Should we apply this fix or will there be an update released?
Re: Problem with custom forward navigation after update to final version of DF19.1
Hi Chris,
We haven't decided on whether/when we'll do an updated build yet. I would only use this bugfix code in your application when you run into this error.
Re: Problem with custom forward navigation after update to final version of DF19.1
Hi Harm,
Yes, that solves the problem.
Thanks.
Re: Problem with custom forward navigation after update to final version of DF19.1
I had the same problem! In my case, only the error message desapeared but, the forward navigation does not works anymore!
What todo?
Thanks!
Genildo
Re: Problem with custom forward navigation after update to final version of DF19.1
Hi Genildo,
Did you update to the new build of 19.1 ([url]https://support.dataaccess.com/Forums/showthread.php?65102-New-DataFlex-2019-Build-19-1-58-is-released!)?[/url] That build should contain the fix for this issue. If it doesn't fix your issue please share a code sample with us that reproduces the issue.
Re: Problem with custom forward navigation after update to final version of DF19.1
I had an error in one view, other views, modals, no problem. This only occurred after the view was idle for a while. The error was "could not render view oView as it was not initialized" This is in v20.0.7. This fix worked here as well. cWebapp.pkg needs to be updated in v20 too.
Re: Problem with custom forward navigation after update to final version of DF19.1
hum...
this is confusing me now...
My DF 19.1 cWebApp.pkg is identical to Harm's BUG FIX post.. which I don't get... if there was a bug-fix for that rev, how mine 19.1 is identical to his ?
DF 19.1.58
[code]
Procedure ShowView_Exec Handle hoView Boolean bStandalone
String[] aParams
String sView
Handle hoInvokingView
// Check if the showview is not overriden by a different ShowView call inside OnNavigateForward, phoCurrentShowView should be set before this function is called
If (phoCurrentShowView(Self) = hoView or (phoCurrentShowView(Self) <> C_WebUnresolvedObject and IsObjectOfClass(phoCurrentShowView(Self), RefClass(cWebModalDialog)))) Begin
Send DoShow of hoView
If (not(bStandalone)) Begin
Get WebObjectName of hoView to sView
Move sView to aParams[0]
Send ClientAction "renderView" aParams
End
Set phoCurrentShowView to C_WebUnresolvedObject
End
End_Procedure
[/code]
But, now @salesnav, my Df 20.0.7 has a different code.. which noe not match the bug-fix.
[code]
{ Visibility=Private }
Procedure ShowView_Exec Handle hoView Boolean bStandalone
String[] aParams
String sView
Handle hoInvokingView
// Check if the showview is not overriden by a different ShowView call inside OnNavigateForward, phoCurrentShowView should be set before this function is called
If (phoCurrentShowView(Self) = hoView or (phoCurrentShowView(Self) <> C_WebUnresolvedObject and IsObjectOfClass(phoCurrentShowView(Self), RefClass(cWebModalDialog)))) Begin
Send DoShow of hoView
[COLOR=#ff0000] Get WebObjectName of hoView to sView[/COLOR]
[COLOR=#ff0000] WebSet psCurrentView to sView[/COLOR]
If (not(bStandalone)) Begin
Move sView to aParams[0]
Send ClientAction "renderView" aParams
End
Set phoCurrentShowView to C_WebUnresolvedObject
End
End_Procedure
[/code]
20.1 is identical to 20.0.7
now what ?
hehe