[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [riena-dev] afterBind vs configureRidgets - what are the differences?
|
configureRidgets is called only once when the controller is
instantiated. At this time the ridgets are not bound to widgets yet.
So access a widget will fail, updateFromModel will fail. It should be
used to setup the controller instance, do the binding and set up
action listeners.
for shared views where you have 1 views with n controllers the
configureRidgets is called for every instance of the n controllers
directly after they are instantiated.
afterBind is called after widgets are bound directly before the view
becomes visible. So you can access widgets, updateFromModel. Its
called after the widgets are newly bound. So if you have a not shared
view, they are only called once when the widgets are bound for the
first and only time.
for shared views afterBind is called every time the view is bound with
the ridgets of a new or changed controller before the view is
activated. if you switch to another view (another type) and switch
back to the same no afterBind is called, if you switch to another view
(another type) and switch to a different instance of the same
controller afterBind is called.
So in short every time the ridgets of this controller are bound newly
to widgets afterBind is called.
Hope that makes it clear
christian
Am 26.08.2009 um 22:22 schrieb Elias Volanakis:
Curious: what are the differences between the methods afterBind() and
configureRidgets() in a Controller? For example are both called
exactly once or is one called more often? What is called first and
what second?
I became interested in this after seeing that some of our demos
override #afterBind(), some #configureRidgets() and some both. So I'm
somewhat confused when to use what...
Thanks,
Elias.
--
Elias Volanakis | Technical Lead | EclipseSource Portland
elias@xxxxxxxxxxxxxxxxx | +1 503 929 5537 | http://eclipsesource.com
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev