The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

CombinedResource (3) [Avatar] Offline
#1
Hi Jay,

I've read through your chapter on listeners and tried using the principles in a 4.02 environment but am stumped. I wan't to be able to fire an event in a view based on the failure/success of a form submission. The view will fire the event and the controller will act upon it via a listener.

I have built an archive which hopefully shows where I am at. I have tried listening for my own generated events and also for render: events from the framework. The render: listeners are part of my trying to work out how to see the events and these are not always successful so I guess there is some principle I am missing big time!
I have pulled out the ext and famfam folders leaving just a few KB of my code here:
http://dl.dropbox.com/u/28281173/EventTest%202.zip

If you could point me in the right direction that would be much appreciated.

Cheers
jesus.garcia (463) [Avatar] Offline
#2
Re: events and listeners problem
I don't see anything about events at a quick glance. I just saw a mock ext js app registration. <confused>
CombinedResource (3) [Avatar] Offline
#3
Re: events and listeners problem
Thanks for the reply Jay - the skeleton code was supposed to show what I was trying at the time.

In the end I did created a listener in the Login Controller like this:

init: function() {
console.log('Initialized Login controller.');
this.application.addListener({ // add to use a handler in the main application control script
'loginsuccess': this.application.doLoginSuccess
});
},