/
File download event is stuck in grids [5.2.2-B1]

File download event is stuck in grids [5.2.2-B1]

The "event" is the way for a user to tell In-Portal to perform a specific action. For example:

  • the "OnUpdate" event would change data in currently edited DB record
  • the "OnCreate" event would create new DB record
  • the "OnSearch" event would perform new search in the grid

There are 2 types of events:

  1. event that does it's job and refreshes the page afterwards (e.g. user makes a search and needs to see used search keyword on the page)
  2. event, that does it's job and doesn't refresh the page afterwards (e.g. file download operation)

Since most of events are of 1st type, then cleaning up the form, used to submit the event isn't necessary because of complete page reload performed afterwards.

Unfortunately this is not the case with 2nd type event and performed action (e.g. file download) would result in some leftovers present in form hidden fields. This creates a problem for cases, when user wants to perform different action on a page, but previous action is still present in form hidden fields.

Solution

  1. move the template restoration code from "submit_kernel_form" function to the "submit_event" function
  2. execute template restoration code in "submit_event" function only, when it was changed
  3. add event restoration code to the "submit_event" function
  4. perform any restoration actions after the "submit_kernel_form" function call

Related Tasks