[CDO] : have fix fragment URI on commit [message #910687] |
Mon, 10 September 2012 08:09 |
Esteban Dugueperoux Messages: 472 Registered: July 2009 |
Senior Member |
|
|
Hi CDO Team,
We have a use case with CDO where a user create a model containment
hierarchy and a IEditorPart is opened on it. This IEditorPart is opened
with a URIEditorInput having a URI finishing with ID of temp CDOID. For
example we have :
cdo://repo1/Test/representations.aird#t4
When the user save the editor, the CDOTransaction is committed, the
CDOID of the root object change to a permanent one, then the
URIEditorInput is anymore valid. Then we must either close the editor
and reopens it to have its URIEditorInput with a correct URI or have
this IEditorPart implements IReusableEditor to do a setInput() with a
new URIEditorInput to use the permanent URI, for example :
cdo://repo1/Test/representations.aird#L16
The solution to close and reopens the editor is not very nice for the
user, and the one of implement IReusableEditor is not very efficient for
a editor opened on a big model containment hierarchy.
In local, with XMIResource we don't have this issue of URI change on
save, then we would like to have the same behaviour with CDOResource.
I understand well that permanent CDOID can only be defined by the CDO
server before than other clients request ones, but do you know a mean to
avoid this URI change on commit?
Best Regards.
|
|
|
Re: [CDO] : have fix fragment URI on commit [message #910729 is a reply to message #910687] |
Mon, 10 September 2012 09:38 |
|
Am 10.09.2012 10:09, schrieb Esteban Dugueperoux:
> Hi CDO Team,
>
> We have a use case with CDO where a user create a model containment hierarchy and a IEditorPart is opened on it. This
> IEditorPart is opened with a URIEditorInput having a URI finishing with ID of temp CDOID. For example we have :
>
> cdo://repo1/Test/representations.aird#t4
>
> When the user save the editor, the CDOTransaction is committed, the CDOID of the root object change to a permanent
> one, then the URIEditorInput is anymore valid.
I see.
> Then we must either close the editor and reopens it to have its URIEditorInput with a correct URI or have this
> IEditorPart implements IReusableEditor to do a setInput() with a new URIEditorInput to use the permanent URI, for
> example :
>
> cdo://repo1/Test/representations.aird#L16
>
> The solution to close and reopens the editor is not very nice for the user,
Definitely not.
> and the one of implement IReusableEditor is not very efficient for a editor opened on a big model containment hierarchy.
Why is that?
> In local, with XMIResource we don't have this issue of URI change on save, then we would like to have the same
> behaviour with CDOResource.
> I understand well that permanent CDOID can only be defined by the CDO server before than other clients request ones,
> but do you know a mean to avoid this URI change on commit?
The only way to avoid that is to use client-assigned IDs (typically UUIDs). This must be set up before the first start
of the repository in cdo-server.xml:
<property name="idGenerationLocation" value="CLIENT"/>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.02886 seconds