Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Contributor
Posts: 46
Registered: ‎05-03-2011
My Device: 9930, PlayBook
My Carrier: Verizon

Application events on multi-page apps

Application events are not firing over multiple pages. I noted that in BBWW 2.0, this was a known issue (for onExit, at least). However, this is true, even using the specified workaround, and in the latest version of BBWW (for smartphones). On each page, I set a handler with something like:

  blackberry.app.event.onExit(_onExit);
  blackberry.app.event.onBackground(_onBackground);
  blackberry.app.event.onForeground(_onForeground);

...and in each case the events will fire on the first page. The onExit handler will not fire on other pages (all using the same initializer code there, all defining the same functions). The code is in a js file included in the head section of each of my pages.

 

Additionally, the onBackground never fires, but the onForeground always fires.