No EObjectDescription could be found in Scope [message #1101400] |
Wed, 04 September 2013 12:09 |
junior developer Messages: 354 Registered: January 2013 |
Senior Member |
|
|
Hi all ,
I created automatically elements in the another resource ,when I am in the current resource.and then give automatically reference in the current resource created elements that are created in the other resource.
BUT ,I can create element (not problem) but I must give index because I must give refence created element.
I do not give correct index and correct reference elements .I load screen shoot.
if I use below code ,ı don't index when add the other resource ,I receive error for give reference.related screenshot 1 and 2
------------------------------------------------------------------
Resource resource = resourceSet.getResource(URI.createURI(userfile), true);
UserModel model = (UserModel) resource.getContents().get(0);
resourceSet.getResources().add(resource);
resource.getContents().add(s);
model.getSitePermissions().add(s);
--------------------------
and I give reference below : rootWeb.setSitePermission( s);
SitePermission s= sitepermission6.createDefaultSitePermission(contentUnitNames.get(index),guid);
sitepermission6.loadForCreateSitePermission(rootWeb, s);
rootWeb.setSitePermission( s);
---------------------------------------------
if I add an index when add the another resource.-> model.getSitePermissions().add(0,s); related screenshot :3 and 4
PS :When I first save in the editor and if the displayname is null,I receive an error screenshot 3 but element is created in the other resource.And then I delete displayname field and I second save in the editor , I do not receive an error and given reference correctly (screenshot 4) :
BUT ,Same element is created secondly.(screenshot 5)
-------------------------------------------------
Resource resource = resourceSet.getResource(URI.createURI(userfile), true);
UserModel model = (UserModel) resource.getContents().get(0);
resourceSet.getResources().add(resource);
resource.getContents().add(s);
model.getSitePermissions().add(0,s);
---------------------------------------------------------------
for I must reach correct referenced element, Every time I must created element two time in the other editor .hence My problem is index.every time I added element 0 index and I must create two time:(
I do not solved this problem really .
Best regards.
|
|
|
Powered by
FUDForum. Page generated in 0.02827 seconds