renderInto killing events

edited May 2012 in Enyo 1.0
I'm having a problem after the initial renderInto(document.body) is done and the user clicks on a button (in a footer), and I do:
new ContactUs().renderInto(subPageContainer.node) and that seems to work fine. However, after that point, clicking (in Chrome or tapping on the phone) does not fire any events.
Any ideas?

Here's the code:


enyo.kind({
name: "Launcher",
kind: "VFlexBox",
scoreCardsPage: null,
contactUsPage: null,
feedPage: null,
published: {
course: {}
},
components: [
{ kind: "Scroller", name: "teeTimeScroller", flex: 1, components: [
{ kind: "Iframe", name: "webview", url: "", flex: 1 }
] },
{ kind: "Control", name: "subPageContainer", flex: 1, showing: false, components: [
]},
{ kind: "HFlexBox", name: "buttonFooter", pack: "end", components: [
{ kind: "Button", name: "teeTimeButton", onclick: "onTeeTimeClick", flex: 1, components: [
{ content: '<img src="img/tee_time_icon.png" width="40" height="40" class="enyo-roundy"/>'},
{ content: 'Tee Time' }
] },
{ kind: "Button", name: "scoreCardButton", onclick: "onScoreCardClick", flex: 1, components: [
{ content: '<img src="img/scorecard_icon.png" width="40" height="40" class="enyo-roundy"/>'},
{ content: 'Score Card' }
] },
{ kind: "Button", name: "contactUsButton", onclick: "onContactUsClick", flex: 1, components: [
{ content: '<img src="img/contact_us_icon.png" width="40" height="40" class="enyo-roundy"/>'},
{ content: 'Contact Us' }
] },
{ kind: "Button", name: "feedButton", onclick: "onFeedClick", flex: 1, components: [
{ content: '<img src="img/feed_icon.png" width="40" height="40" class="enyo-roundy"/>'},
{ content: 'Feed' }
] }
]}
],
create: function() {
this.inherited(arguments);
Startup.setup(this);
this.db = DB.getDB();
this.database = this.db.getDatabase();
this.course = this.db.getHomeCourse();
this.$.webview.setUrl(this.course.site_url);
this.$.feedButton.setShowing(enyo.isString(this.course.feed_url) && this.course.feed_url.length > 0);
},
onTeeTimeClick: function(inSender, inEvent) {
enyo.log("Tee Time clicked");
this.$.subPageContainer.hide();
this.$.teeTimeScroller.show();
this.$.webview.setUrl(this.course.tee_time_url);
},
onScoreCardClick: function(inSender, inEvent) {
enyo.log("Score Card clicked");
this.$.teeTimeScroller.hide();
this.$.subPageContainer.show();
if (this.scoreCardsPage == null) {
this.scoreCardsPage = new ScoreCards();
}
this.scoreCardsPage.renderInto(this.$.subPageContainer.node);
},
onContactUsClick: function(inSender, inEvent) {
enyo.log("Contact Us clicked");
this.$.teeTimeScroller.hide();
this.$.subPageContainer.show();
if (this.contactUsPage == null) {
this.contactUsPage = new ContactUs();
}
this.contactUsPage.renderInto(this.$.subPageContainer.node);
},
onFeedClick: function(inSender, inEvent) {
enyo.log("Feed clicked");
this.$.teeTimeScroller.hide();
this.$.subPageContainer.show();
if (this.feedPage == null) {
this.feedPage = new Feed();
}
this.feedPage.renderInto(this.$.subPageContainer.node);
}
});


Comments

Sign In or Register to comment.