Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Tab - tableview + database reload

I have a 'search' and 'search history' tab in my application.
Every search executed under this tab gets inserted into my local db.

However the new search is not reflected in the tableview retrieving data from the DB in the 'search history' tab when i browse to it, after searching.

The latest search, however, gets loaded when I exit the app and relaunch it.

I need some help in figuring out how to trigger the tableview reload without exiting the app.


I feel 'noobish' for asking this question but it was really so simple

I added a 'focus' eventlistener for the window housing the tab to load the data.

win.addEventListener('focus', function()

— asked June 1st 2010 by Johnny Basu
  • database
  • reload
  • tab
  • tableview
1 Comment
  • Hey! Johnny can you pls tell me what should the loadDBdata function contain…Thanx in Advance

    — commented June 14th 2013 by Amaresh Beuria

1 Answer

  • Johnny, I know its been a while since you answered your own post. But how would i go about solving this issue if my table view is inside a tabgroup?

    — answered November 20th 2011 by ilan perez
    1 Comment
    • ilian perez: Set an application-level event listener inside the receiving tab (Ti.App.addEventListener) and then fire the event from the sending tab (Ti.App.fireEvent) More here http://developer.appcelerator.com/blog/2010/08/execution-contexts.html

      — commented January 12th 2012 by Alex Raz
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.