JADE Environment Development Ideas

What's new in the upcoming JADE release?

IMPROVED DEVELOPER EFFICIENCY. ENHANCED SECURITY. SMOOTHER INTEGRATION

The JADE 2022 release meets tomorrow’s business demands.


Start your update to JADE's latest release

Efficient setEventMapping method

As per Jade documentation. As this call is relatively expensive, you should use it sparingly.
Caused by all the sanity checks. Provide an efficient method that bypasses the checks and simply fails at run-time. This would improve dynamic control creation performance.
e.g We dynamically add menu items to a form, profiling shows this method takes 60% of the time to load the form 1281 ms

Publish and make available method MenuItem::_getEventMapping
  • Guest
  • May 1 2019
  • Shipped
HistoricalComments
Troy Fowles 12/10/2017 9:49:27 AM
That works fine in the case where the new menuitem being cloned is arming the same set of events mapping to the same event methods. Not always the case.

I can use the cloned method if I could access the event mapping via a published method. i.e. please make _getEventMapping public

Bob Davis 9/10/2017 4:28:27 PM
When you call MenuItem::loadMenu or MenuItem::loadSubMenu, the events defined for the menu being cloned will also be called by the new menu item created. The menuItem parameter sent to the menu distinguishes which menu item was selected/clicked. The same principle applies for Control::loadControl. That is, the existing events defined for the control being cloned are called for the new control, passing the control that generated the event as the first parameter.
Therefore use of this existing behaviour can avoid the need to call setEventMapping.
  • Attach files
  • +7