|
Re: [Teneo] Creating/Opening several GMF diagrams [message #115793 is a reply to message #115778] |
Wed, 26 March 2008 10:58 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Matthias,
Good that the tutorial works for you. The tutorial is just 2 weeks old so if there are things I need
to change to make it easier then let me know.
Regarding your question, the solution is to use a different query in the uri. The datastore can
remain the same. You can use any hql query in the uri to load a specific diagram and related domain
object(s). So in this way you can for example have a list view which shows the diagrams (you can
load the current set of diagrams from the db using hql either within a resource or outside of a
resource) and when clicking on a diagram open a resource using a specific hql in the uri to open
that diagram:
hbxml://?dsname=mindmap&query1=from Map&query2=from Diagram where name='MySelectedDiagram'
The datastore can be the same for all resources/queries.
gr. Martin
Matthias wrote:
> Hi Martin!
>
> I followed your (very good) GMF Tutorial and got everything working!
> But I have a certain use case and I hope it is feasable with Teneo ;)!
>
> I want to open one or more graphical editors, each with there own domain
> model instance and GMF diagram instance: so (technically speaking)
> URIEditorInput shall be not equal between the model instances.
>
> I think this line can help me (copied from the tutorial):
> public static final URI DATABASE_URI =
> URI.createURI("hbxml://?dsname=mindmap&query1=from Map&query2=from
> Diagram");
>
> But certainly I dont know how. Ok, it would be possible to create for
> each new diagram editor a DataStore, but ..hmm... answer yourself.
>
> Is there another way to select a specific domain element and the related
> diagram element from the Database?! Or is it only possible to store
> exactly *one* domain and diagram element to a database?!
>
> Maybe, the solution is rather easy, but I am really new to Teneo...
>
> Thank you in advance!
>
> Best regards,
> Matthias
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
|
Re: [Teneo] Creating/Opening several GMF diagrams [message #615983 is a reply to message #115778] |
Wed, 26 March 2008 10:58 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Matthias,
Good that the tutorial works for you. The tutorial is just 2 weeks old so if there are things I need
to change to make it easier then let me know.
Regarding your question, the solution is to use a different query in the uri. The datastore can
remain the same. You can use any hql query in the uri to load a specific diagram and related domain
object(s). So in this way you can for example have a list view which shows the diagrams (you can
load the current set of diagrams from the db using hql either within a resource or outside of a
resource) and when clicking on a diagram open a resource using a specific hql in the uri to open
that diagram:
hbxml://?dsname=mindmap&query1=from Map&query2=from Diagram where name='MySelectedDiagram'
The datastore can be the same for all resources/queries.
gr. Martin
Matthias wrote:
> Hi Martin!
>
> I followed your (very good) GMF Tutorial and got everything working!
> But I have a certain use case and I hope it is feasable with Teneo ;)!
>
> I want to open one or more graphical editors, each with there own domain
> model instance and GMF diagram instance: so (technically speaking)
> URIEditorInput shall be not equal between the model instances.
>
> I think this line can help me (copied from the tutorial):
> public static final URI DATABASE_URI =
> URI.createURI("hbxml://?dsname=mindmap&query1=from Map&query2=from
> Diagram");
>
> But certainly I dont know how. Ok, it would be possible to create for
> each new diagram editor a DataStore, but ..hmm... answer yourself.
>
> Is there another way to select a specific domain element and the related
> diagram element from the Database?! Or is it only possible to store
> exactly *one* domain and diagram element to a database?!
>
> Maybe, the solution is rather easy, but I am really new to Teneo...
>
> Thank you in advance!
>
> Best regards,
> Matthias
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
|
Powered by
FUDForum. Page generated in 0.03296 seconds