app-foundation - ViewHandler, question about listeners

Hi everybody,

I use appfoundation addon in my web application. The functionalities which I use are: storing POJO’s, changing Views, handling with permissions. So this addon is very useful for me.

With the application developments I’ve reached the place where I am fighting with a problem.

As I have said earlier, I use appfoundation to navigating between different views. Basically I do it with simple method ViewHandler.activateView(HERE VIEW ID AND SOME PARAMETERS).

In my app I have the calendar component in which I can add and remove different events. The question is how to implement, with appfoundation help, the functionality, which will be fired when the user wants to change the view but changes which have been made in calendar component are not saved.

For now I have found that in the Navigator component there is the listener: addViewChangeListener which have two methods: beforeViewChange and afterViewChange. But unfortunately in the view module in appfoundation I didn’t find any similar listeners.

Thank you in advance, Best regards MR

Have you tried using DispatchEventListeners? Implement the interface and register it to the ViewHandler. The equivalent for beforeViewChange would be preActivation() and afterViewChanged corresponds to postActivation().