Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Nesting controllers
Nesting controllers [message #723841] Fri, 09 September 2011 12:21 Go to next message
Peter Kullmann is currently offline Peter Kullmann
Messages: 199
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 08:03 Go to previous message
Christian Campo is currently offline Christian Campo
Messages: 590
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: Thu Jul 24 02:43:51 EDT 2014

Powered by FUDForum. Page generated in 0.01908 seconds