Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] SWTDesigner and Riena Views

no no no :-)

great you made the contact to Instantiations. I will contact them as soon as I have the webinar out of the way. great to hear that they can now deal with
the alternativ method.

However the c) part is where I fully disagree.

The View does not know anything about Ridgets, it does not create them, does not reference them or has any knowledge about ridgets at all. So I dont think the SWTDesigner has to be extended in that way. That also means that the View does not create Ridgets to inject the UIControls into them.

That is all done by the DefaultBindingManager. The idea is that there is one view instance but you can bind multiple controllers against it (of course only one controller at a time). I am not sure how this is done if you dont use the Riena navigation model.

Still if you subclass the SubModuleView class in your view, all you need to do is

Text firstName= new Text(); // create SWT widget;
addUIControl(firstName,"firstName"); // add widget to the set of widget under a name.

Then the DefaultBindingManager or InjectBindingManager can take this collection of widgets, create ridgets for them (at binding time) and call "configureRidgets" on your Controller so that you can bind the ridgets against your model.

The view does not or should not know about the model but only deal with widgets, fonts, color, layout and such stuff.

There is a good example how to embedd a Riena View into an RCP application in org.eclipse.riena.sample.app.client.rcpmail.

Just the standard RCP app and from the Example App, the marker View and Control as one tab folder. There you see the same pattern, where the View calls addUIControl, and the controller picks up the ridget in the method configureRidgets.

Hope that helps.

It would certainly help if SWTDesigner creates this addUIControl method call. I will talk to him about this.

christian
Am 26.11.2008 um 08:22 schrieb ekkehard:

hi,

for me its very important that I can design my Riena Views using a
designer tool like SWTDesigner.

After emailing Eric Clayberg from Instatiations:

1. latest release from SWTDesigner now accept basicCreatePartControl(),
so we can open a view without a problem

2. Riena comitters can get a full version:
http://www.instantiations.com/company/opensource.html

3. Eric needs more information with small examples to see if SWTDesigner
can be used better for Riena

For me as an user I would like to get following:
a) connect a Riena Controller to a View which means:
SWTDesigner analyzes
...extends SubModuleView<CustomerDetailsSubModuleController>...
to know where's the controller
b) from the controller SWTDesigner can get the bean(s) from datamodel
c) the widget in the view 'knows' the corresponding property in the
controller
so SWTDesigner can generate:
- in viewpart code like
...
TextRidget textFacade = new TextRidget();
textFacade.setUIControl(numberText);
getController().setNumberFacade(textFacade);
...
- in controller code like
...
numberFacade.bindToModel(customer, "customerNumber"); //$NON-NLS-1$
numberFacade.updateFromModel();
...
   public ITextRidget getNumberFacade() {
       return numberFacade;
   }

   public void setNumberFacade(ITextRidget numberFacade) {
       this.numberFacade = numberFacade;
   }
....

SWTDesigner can work with beans and jface_databinding, so I think it
could be possible
to do generation

I dont know if I have described it correct or understand it correct how
riena views are working,
but I'm hoping that you Riena experts can make a good example for Eric
and the Instantiations team
to make it work

from sessions at EclipseSummitEurope I know, that I'm not the only one
who needs such a support -
I think its a common thing in enterprise business application -
projects, that there's a UI designer to
design complex Views.

Christian Campo has Erics mailaddress

thanks

ekke
BTW: not all of the Views have to be designed - each project also has a
number of views with CRUD functionality
which can be generated. we have nearly finished a new project 'redView'
which means
Riena EMF Dynamic View
where you have an EMF ecore model for the View,
a ViewDesigner to rearrange the order of fields, markers, validation etc.
persist those changes
and a dynamically generated Composite
stay tuned... if its ready to try out I'll post it here
ekke


_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev



Back to the top