Webview not loading again while clicking on the tab again
I'm working with titanium and developing tabbed application same as
kitchen sink
My Home tab loads html data from the json file Here is the code,
HomeContent.js
function HomeWindow(title) {
var self = Ti.UI.createWindow({
title:title,
backgroundColor:'white'
});
var fileName = 'includes/HomeContent.json';
var file =
Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,
fileName);
var preParseData = (file.read().text);
var response = JSON.parse(preParseData);
var content = response[0].content;
var webview = Titanium.UI.createWebView({data:content});
self.add(webview);
return self;
};
module.exports = HomeWindow;
It is working first time while click again it does not call particular
HTML again.
for more reference Here it is my tab generating code, I don't think so it
creates any problem,
var homewindowWin = new HomeWindow(L('HomeContent'));
var homeTab = Ti.UI.createTab({
title: L('Home'),
icon: '/images/tabs/KS_nav_ui.png',
window: homewindowWin
});
homewindowWin.containingTab = homeTab;
self.addTab(homeTab);
Stuck with that any help will be highly appreciate.
No comments:
Post a Comment