[Users] how to understand UI design
Vojtech Szocs
vszocs at redhat.com
Thu May 9 14:03:54 EDT 2013
Hi guys,
Lior's UI design overview is very good, I just have a small comment:
> Notice the method edit() where event listeners are created and events are handled.
Event listener registration should be preferably done in Presenter(Widget)s instead of in Views, simply because Presenter(Widget).registerHandler() method will ensure that these listeners are removed properly when a non-singleton Presenter(Widget)/View component is disposed a.k.a "unbound" [i.e. HostSetupNetworksPopup{PresenterWidget|View} is non-singleton, just like any other dialog bound to UiCommon model].
Furthermore, edit() could be potentially called multiple times to repeatedly refresh UI from UiCommon model, so event listeners should be registered only once in HostSetupNetworksPopupPresenterWidget.init() method override, instead. In case of Setup Host Networks dialog, it's not a big deal, HostSetupNetworksPopupView.edit() is called only once when the dialog is shown, though..
Regards,
Vojtech
----- Original Message -----
From: "Lior Vernia" <lvernia at redhat.com>
To: "bigclouds" <bigclouds at 163.com>
Cc: users at ovirt.org
Sent: Tuesday, April 23, 2013 9:29:52 AM
Subject: Re: [Users] how to understand UI design
Hello,
Generally speaking, for each popup window and tab you have a model class
in the uicommonweb project which takes care of the business logic, and a
view class in the webadmin project which takes care of presenting the
logic to the user.
Concerning UI operations (drag & drop, clicking etc.), there's a system
of events and listeners. If you're asking specifically about the Setup
Networks dialog, a good place to start is the HostSetupNetworksPopupView
class. Notice the method edit() where event listeners are created and
events are handled.
Hope this helps, feel free to ask more specific questions.
Yours, Lior Vernia.
On 23/04/13 09:47, bigclouds wrote:
> hi,all
> i need to make some modification on UI,
> could you tell me the mechanism of host setupNetwork, operations like
> drag,drop , and how to catch its event, how to get data corresponding to
> operations.
>
> thanks
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
Users at ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
More information about the Users
mailing list