CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

NOTICE!: Cannot use same component name in different frames

by ScottWGast » 29 Sep 2016 22:55

Error message: "The file cannot be returned by the server"

This bug (issue, problem, undocumented feature, whatever you want to call it)... caused me much time, so I thought y'all might like a heads up.

My program has basically 1 form and everything else is done using frames on the form and frames on modal dialog boxes. The issue comes into play when you have a TIWCGJQFileDownload component on your frames. I happen to have 3 or 4 fames (of 30 or so), that have the download component named fileDownload. The problem comes into play when I create the modal dialog frame containing a "fileDownload" component (in my case, one on the form and one on a modal dialog) and then attempt to use the "fileDownload" component that resides on the form.

In any case, giving each instance of the TIWCGJQFileDownload component a unique name fixed the problem, even though the two "same-named" components reside on completely different frames.

Hope this helps someone!
Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02

by Alexander Bulei » 30 Sep 2016 16:45

Hi ScottWGast,

Thank you for your tip/help!

Can I ask you, why you have several TIWCGJQFileDownload components?
It's a independent component and provide methods to download only.
The correct way of usage, is have only 1 component, in mainform for example, and call the available methods when need.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by ScottWGast » 02 Oct 2016 17:56

Alexander,

I appreciate your response; the only reason that I can come up with as to why I don't have a single download component on the main form is (probably) an attempt to encapsulate each of the various frames so that they don't have to reach outside themselves to perform any function.

That being said, and coming from a non-browser development environment (D1-DXE2) into browser based development, I am slowly figuring out good development techniques for browser applications. To that end, I will move the download component to the main form so that it can service all of the various frames associated with that form.

Thank you for the advice.

Scott
ScottWGast
 
Posts: 875
Joined: 23 May 2012 11:02


Return to JQFileDownload

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.