Skip to content
Snippets Groups Projects
Commit 06d78231 authored by cramakri's avatar cramakri
Browse files

Show only designated entities in the root view

SVN: 27415
parent 0706bbef
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,10 @@ id ObjectFromJsonData(NSString *jsonData, NSError **error)
if (rawEntity.identifier) self.identifier = rawEntity.identifier;
if (rawEntity.imageUrl) self.imageUrl = rawEntity.imageUrl;
if (rawEntity.properties) self.propertiesJson = rawEntity.properties;
if (rawEntity.rootLevel) self.rootLevel = [NSNumber numberWithBool: [rawEntity.rootLevel length] > 0];
if (rawEntity.rootLevel) {
BOOL rootLevel = [rawEntity.rootLevel length] > 0;
self.rootLevel = [NSNumber numberWithBool: rootLevel];
}
}
@end
......@@ -17,6 +17,7 @@
</entity>
<fetchRequest name="EntitiesByPermIds" entity="CISDOBIpadEntity" predicateString="permId IN $PERM_IDS" fetchBatchSize="20"/>
<fetchRequest name="EntityAndChildren" entity="CISDOBIpadEntity" predicateString="SELF == $ENTITY OR permId IN $CHILDREN" fetchBatchSize="20"/>
<fetchRequest name="RootEntities" entity="CISDOBIpadEntity" predicateString="rootLevel == 0" fetchBatchSize="20"/>
<elements>
<element name="CISDOBIpadEntity" positionX="0" positionY="0" width="128" height="240"/>
</elements>
......
......@@ -151,6 +151,9 @@
[fetchRequest setEntity:entity];
[fetchRequest setFetchBatchSize:20];
NSPredicate *predicate = [NSPredicate predicateWithFormat: @"rootLevel == YES"];
[fetchRequest setPredicate: predicate];
NSSortDescriptor *categorySortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"category" ascending: NO];
NSSortDescriptor *summaryHeaderSortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"summaryHeader" ascending: YES];
NSArray *sortDescriptors = @[categorySortDescriptor, summaryHeaderSortDescriptor];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment