The second property allows you to define the surrounding container of what's being refreshed, ie, the region. Most reports would have this adjusted to Dynamic. The default option is static perhaps as the lowest common denominator, favouring speed. This maps to a jQuery setting that, as the item help describes:īinds the event handler to the triggering element(s) for the lifetime of the current page, irrespective of any triggering elements being recreated via Partial Page Refresh (PPR). Set Dynamic Action Event Scope to Dynamic This is easily adjusted using the Event Scope property for the on click dynamic action, using the 'Dynamic' option (formerly 'Live'). You'll find a problem if the report is refreshed due to a range of actions such re-sorting, applying filter, or perhaps invoked as a refresh action in yet another dynamic action - the on click dynamic action on our action button no longer works! I can't believe I neglected this property in the first place. Partial Page Refresh May 2017 - I've added this section in response to a reader comment. Or you could add a declarative true action to hide the triggering element, so the button can't be double clicked by a frustrated user. Though this may make pagination feel a little strange, as the number of rows displayed won't add up. If you were defining a remove function, then a second statement could be added to immediately hide the row from view without needing to refresh the report by locating the surrounding tr tag. $(iggeringElement).closest('tr').find('td').text() Classic reports automatically use the column alias. For IR you would need to first define static ID for the column as SAL. If other information was required, you could define more data tags, or traverse the DOM to find other values in the row. iggeringElement represents the button pressed, which is generated as the following HTML. $s('P2_ADD', $(iggeringElement).data('id')) ĭon't forget to set this to not Fire on Page Load. It sets the page item with the value of the ID set in the data tag.
Use the following selector to identify add button clicks on your report.Īdd an action to execute the following JavaScript.