Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Nesting controllers
Nesting controllers [message #723841] Fri, 09 September 2011 16:21 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
In an existing RCP application I have some nested gui components and would like to know how to set them up with Riena.

For a simple ViewPart with a few Text controls one can create an AbstractRidgetController and a DefaultSwtBindingDelegate, add all controls to the delegate and bind the stuff with the configureWidgets() method of the controller. The controller has its own life cycle whereas the delegate is bound to the widgets (i.e. on disposal of the widgets the delegate unbinds and removes the ridgets).

Now suppose one of the controls is a Composite with its own set of controls and is included in the ViewPart (e.g. a Group with some related fields). I would like to have a separate Controller for this thing. How can I connect the parent controller to the child? For instance I would like to check whether there are any validation errors in the ViewPart. This check (done by iterating all widgets) should also include all ridgets of the nested controller.

Regards,
Peter
Re: Nesting controllers [message #724462 is a reply to message #723841] Mon, 12 September 2011 12:03 Go to previous message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
Am 09.09.11 18:21, schrieb Peter Kullmann:
> In an existing RCP application I have some nested gui components and would like to know how to set them up with Riena.
> For a simple ViewPart with a few Text controls one can create an AbstractRidgetController and a
> DefaultSwtBindingDelegate, add all controls to the delegate and bind the stuff with the configureWidgets() method of the
> controller. The controller has its own life cycle whereas the delegate is bound to the widgets (i.e. on disposal of the
> widgets the delegate unbinds and removes the ridgets).
> Now suppose one of the controls is a Composite with its own set of controls and is included in the ViewPart (e.g. a
> Group with some related fields). I would like to have a separate Controller for this thing. How can I connect the parent
> controller to the child? For instance I would like to check whether there are any validation errors in the ViewPart.
> This check (done by iterating all widgets) should also include all ridgets of the nested controller.
I am doing a little guessing here and you tell me if that works....There is a ridget for the Composite
(CompositeRidget). So if you give the composite a name in the view (addUIControl) you can reference it in the
controller, create your separate Mini-Controller and pass on that ridget instance for example......

Check validation errors in the SubModuleController can be done by calling getMarkersOfType(ErrorMarker.class). If there
are any, you have an error :-).

Going in the right direction ?
>
> Regards,
> Peter
>

christian
Previous Topic:Does Riena make sense without SWT?
Next Topic:How to do a multifield validiation in Riena
Goto Forum:
  


Current Time: Sat Apr 20 02:15:28 GMT 2024

Powered by FUDForum. Page generated in 0.02611 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top