Menu

#23 File Transfer component causes infinite screen refresh

open
nobody
None
5
2003-08-22
2003-08-22
Anonymous
No

On particularly complex pages, including the file
transfer component on the page and clicking "send" can
cause a "infinite refresh loop". This happens because a
E_setAction() javascript call is included in the onload
body of the iframe that contains the file upload
component. The E_setAction call refreshes all the Echo
components, including the file transfer component,
which then causes the E_setAction() to fire again (from
the onload in the iframe) and so on. In debugging this
problem, it was found that the E_setAction javascript
call inclusion is controlled by a member variable flag
called submitController within the UploadForm class.
Once this flag was set, it was never cleared again. In
studying the code, it appeared the E_setAction call was
intended to clear flag via the the clientAction method
within the UploadForm object. However the recipient of
the E_setAction() call is actually a UploadSelectUI
object and not a UploadForm object, hence the
submitController was always staying set. A simple fix
to this problem is to forward the E_setAction() event
from the UploadSelectUI object to the UploadForm via
the clientAction method like so:

public void clientAction(String command)
{
form.clientAction(command);
}

This works since the UploadSetectUI object contains a
reference to the UploadForm via a form member variable.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.