Databinding on view part action, toolbar items andmenu items

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Databinding on view part action, toolbar items andmenu items

Postby hyshyshys » Tue Aug 19, 2008 12:19 pm

Hi,

Is it possible to add databinding on view part action, toolbar items or menu items? If yes, how?

When I go to the databinding dialog, I see in the target (widgets) navigation window all my actions, toolbar items and menu items, but there is no property available for each of them. So I'm not able to complete the assignations with my source model...

Any clues?

Regards and thank
Vincent
hyshyshys
 
Posts: 37
Joined: Thu Jul 03, 2008 12:27 pm

Re: Databinding on view part action, toolbar items andmenu items

Postby Eric Clayberg » Tue Aug 19, 2008 2:53 pm

hyshyshys wrote:Is it possible to add databinding on view part action, toolbar items or menu items? If yes, how?

The Eclipse DB API does not support direct binding to those types of elements. You can try binding to them as generic beans however.

hyshyshys wrote:When I go to the databinding dialog, I see in the target (widgets) navigation window all my actions, toolbar items and menu items, but there is no property available for each of them

Those items do not have any bindable widget properties. If you switch to the Target (Beans) list, you can select them and any bean properties they have.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Databinding on view part action, toolbar items andmenu items

Postby hyshyshys » Wed Aug 20, 2008 4:14 am

Thank Eric, It works.

Note that you should set the target update strategy to POLICY_NEVER because the DB API is not able to attach listener on the action bean.

Vincent
hyshyshys
 
Posts: 37
Joined: Thu Jul 03, 2008 12:27 pm

Re: Databinding on view part action, toolbar items andmenu items

Postby Eric Clayberg » Wed Aug 20, 2008 8:13 am

hyshyshys wrote:Note that you should set the target update strategy to POLICY_NEVER because the DB API is not able to attach listener on the action bean.

That is also true for any bean that does not support having a listener attached.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests