diff --git a/openbis-ipad/BisKit/Classes/CISDOBIpadEntity.m b/openbis-ipad/BisKit/Classes/CISDOBIpadEntity.m index e95e0e3bdd5164b6194df0fdcc2b30ab7684bf84..6bc1ac1097eeb91fd7e6539330e017628ccc00cb 100644 --- a/openbis-ipad/BisKit/Classes/CISDOBIpadEntity.m +++ b/openbis-ipad/BisKit/Classes/CISDOBIpadEntity.m @@ -72,6 +72,10 @@ [self didAccessValueForKey: @"childrenPermIds"]; if (nil == childrenPermIds) { + // This value has not yet been initialized from the server. + // Leave it as nil + if (nil == self.childrenPermIdsJson) return nil; + NSError *error; childrenPermIds = [NSJSONSerialization JSONObjectWithData: [self.childrenPermIdsJson dataUsingEncoding: NSASCIIStringEncoding] options: 0 error: &error]; if (error) { @@ -85,15 +89,15 @@ - (void)initializeFromRawEntity:(CISDOBIpadRawEntity *)rawEntity { - self.summaryHeader = rawEntity.summaryHeader; - self.summary = rawEntity.summary; - self.identifier = rawEntity.identifier; self.permId = rawEntity.permId; self.refcon = rawEntity.refcon; self.category = rawEntity.category; - self.imageUrl = rawEntity.imageUrl; + self.summaryHeader = rawEntity.summaryHeader; + self.summary = rawEntity.summary; self.childrenPermIdsJson = rawEntity.children; - self.propertiesJson = rawEntity.properties; +// self.identifier = rawEntity.identifier; +// self.imageUrl = rawEntity.imageUrl; +// self.propertiesJson = rawEntity.properties; } @end diff --git a/openbis-ipad/BisKit/Classes/CISDOBIpadService.m b/openbis-ipad/BisKit/Classes/CISDOBIpadService.m index 71e8cfd7211a2fe599e0f190b66e61c0371024e9..58837feb91e0d2286956183724c70b264319d2d0 100644 --- a/openbis-ipad/BisKit/Classes/CISDOBIpadService.m +++ b/openbis-ipad/BisKit/Classes/CISDOBIpadService.m @@ -143,10 +143,11 @@ NSString *const CISDOBIpadServiceErrorDomain = @"CISDOBIpadServiceErrorDomain"; - (CISDOBAsyncCall *)listRootLevelEntities; { + NSDictionary *parameters = [NSDictionary dictionaryWithObject: @"ROOT" forKey: @"requestKey"]; CISDOBAsyncCall *connectionCall = [_connection createReportFromDataStore: [_ipadReadService objectForKey: @"dataStoreCode"] aggregationService: [_ipadReadService objectForKey: @"serviceKey"] - parameters: nil]; + parameters: parameters]; CISDOBIpadServiceCall *iPadCall = [self iPadCallWrappingConnectionCall: connectionCall]; connectionCall.success = ^(id result) { diff --git a/openbis-ipad/BisKit/Tests/CISDOBIpadServiceTest.m b/openbis-ipad/BisKit/Tests/CISDOBIpadServiceTest.m index 13781a398ef2f68e000dfd0a67487e4f1f366499..45bddbd6480f022fde28d792723e08672cc5c363 100644 --- a/openbis-ipad/BisKit/Tests/CISDOBIpadServiceTest.m +++ b/openbis-ipad/BisKit/Tests/CISDOBIpadServiceTest.m @@ -68,15 +68,15 @@ for (CISDOBIpadRawEntity *rawEntity in rawEntities) { NSString *summaryHeader = rawEntity.summaryHeader; STAssertNotNil(summaryHeader, @"The summary header should not be nil"); - STAssertTrue([summaryHeader length], @"Summary header should not be empty"); - STAssertNotNil(rawEntity.summary, @"Summary should not be nil"); - STAssertNotNil(rawEntity.identifier, @"Identifier should not be nil"); STAssertNotNil(rawEntity.permId, @"PermId should not be nil"); STAssertNotNil(rawEntity.refcon, @"Ref con should not be nil"); STAssertNotNil(rawEntity.category, @"Group should not be nil"); - STAssertNotNil(rawEntity.imageUrl, @"Image url should not be nil"); - STAssertNotNil(rawEntity.children, @"Children should not be nil"); - STAssertNotNil(rawEntity.properties, @"Properties type should not be nil"); + STAssertTrue([summaryHeader length], @"Summary header should not be empty"); + STAssertNotNil(rawEntity.summary, @"Summary should not be nil"); +// STAssertNotNil(rawEntity.identifier, @"Identifier should not be nil"); +// STAssertNotNil(rawEntity.imageUrl, @"Image url should not be nil"); +// STAssertNotNil(rawEntity.children, @"Children should not be nil"); +// STAssertNotNil(rawEntity.properties, @"Properties type should not be nil"); } } diff --git a/openbis-ipad/Research/BisMac.xcodeproj/project.pbxproj b/openbis-ipad/Research/BisMac.xcodeproj/project.pbxproj index 8b086c40e2e82de8fb2f9c4a6e2dfdeca0d275fc..5994abf7d34c7c5330d9473b7c87fe5e5ea604e0 100644 --- a/openbis-ipad/Research/BisMac.xcodeproj/project.pbxproj +++ b/openbis-ipad/Research/BisMac.xcodeproj/project.pbxproj @@ -44,8 +44,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 3649C8A815EBB2950019AC55 /* CISDOBConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CISDOBConnection.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 3649C8A915EBB2950019AC55 /* CISDOBConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CISDOBConnection.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 3649C8A815EBB2950019AC55 /* CISDOBConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CISDOBConnection.h; sourceTree = "<group>"; }; + 3649C8A915EBB2950019AC55 /* CISDOBConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CISDOBConnection.m; sourceTree = "<group>"; }; 3649C8AC15EC17D80019AC55 /* CISDOBJsonRpcCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CISDOBJsonRpcCall.h; sourceTree = "<group>"; }; 3649C8AD15EC17D80019AC55 /* CISDOBJsonRpcCall.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CISDOBJsonRpcCall.m; sourceTree = "<group>"; }; 3649C8AF15ECA4EA0019AC55 /* CISDOBShared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CISDOBShared.h; sourceTree = "<group>"; }; diff --git a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate index 5f0f0c0cd1d98b20b64f5263a8e3cfcdc17e1206..66fddca30642ac75b0b341194369b52f797fde0a 100644 Binary files a/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate and b/openbis-ipad/Research/BisMac.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate b/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate index 08a82523970fbc1891b62f179a1adbb525a2a7d7..cf65c7d6cf69959a369c7b8fc584efed5db4ea9c 100644 Binary files a/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate and b/openbis-ipad/openBIS/openBIS.xcodeproj/project.xcworkspace/xcuserdata/cramakri.xcuserdatad/UserInterfaceState.xcuserstate differ