com.googlecode.jpattern.gwt.client.presenter
Class APresenter<T extends IView>

java.lang.Object
  extended by com.googlecode.jpattern.gwt.client.presenter.APresenter<T>
All Implemented Interfaces:
IPresenter

public abstract class APresenter<T extends IView>
extends Object
implements IPresenter

Author:
Francesco Cina' 14 Apr 2011

Constructor Summary
APresenter(IShowViewStrategy<T> showViewStrategy)
           
 
Method Summary
 void endLoading()
          This method must be called when all the necessary operations to load necessary data are endend.
protected  T getView()
           
 void onEventError(List<com.googlecode.jpattern.shared.result.IErrorMessage> errorMessages)
          Called by the IEvent when the result of the execution is not valid
 void onEventStart()
          Clear the error area before the execution of a new event
abstract  void postDisplay()
          This method is called after the rendered of the IView.
abstract  void preDisplay()
          This method is called before the rendered of the IView.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APresenter

public APresenter(IShowViewStrategy<T> showViewStrategy)
Method Detail

onEventError

public final void onEventError(List<com.googlecode.jpattern.shared.result.IErrorMessage> errorMessages)
Description copied from interface: IPresenter
Called by the IEvent when the result of the execution is not valid

Specified by:
onEventError in interface IPresenter

onEventStart

public final void onEventStart()
Description copied from interface: IPresenter
Clear the error area before the execution of a new event

Specified by:
onEventStart in interface IPresenter

getView

protected final T getView()

preDisplay

public abstract void preDisplay()
This method is called before the rendered of the IView. It should be better to not perform asynchronous actions in this method.


postDisplay

public abstract void postDisplay()
This method is called after the rendered of the IView. Here the asynchronous actions should be performed. Its VERY important to call the endLoading() method when all the actions are performed otherwise the IView should not be displayed.


endLoading

public final void endLoading()
This method must be called when all the necessary operations to load necessary data are endend. This causes the final rendering of the IView.



Copyright © 2011. All Rights Reserved.