{ "id": "110718", "key": "TIMOB-12983", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "93394", "key": "TIMOB-9603", "fields": { "summary": "BlackBerry: Identify missing Titanium.UI.Tab functionality", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15098", "description": "2013 Sprint 06 BB", "name": "2013 Sprint 06 BB", "archived": true, "released": true, "releaseDate": "2013-03-25" }, { "id": "14816", "description": "2013 Sprint 06", "name": "2013 Sprint 06", "archived": true, "released": true, "releaseDate": "2013-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-03-19T02:04:02.000+0000", "created": "2013-03-06T21:40:15.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-08T18:25:22.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "Implement the TabGroup.activeTab and Tab.active properties and set/get methods.\r\nThese allow developers to determine if or what tab in a group is currently active.\r\nDevelopers may also set this property to true/false to toggle which tab is active.\r\n\r\nh3. Acceptance Test\r\n{code:javascript}\r\nvar tabGroup = Ti.UI.createTabGroup();\r\n \r\nvar tab1 = Ti.UI.createTab({\r\n  title: 'A tab.',\r\n  window: Ti.UI.createWindow({backgroundColor: 'blue'})\r\n});\r\ntabGroup.addTab(tab1);\r\n \r\nvar tab2 = Ti.UI.createTab({\r\n  title: 'Another tab.',\r\n  window: Ti.UI.createWindow({backgroundColor: 'red'})\r\n});\r\ntabGroup.addTab(tab2);\r\n \r\ntabGroup.open();\r\n \r\nfunction logTabInfo() {\r\n  Ti.API.info('active tab: ' + tabGroup.activeTab.title);\r\n  Ti.API.info('1st tab active: ' + tab1.active);\r\n  Ti.API.info('2nd tab active: ' + tab2.active);\r\n}\r\n\r\nlogTabInfo();\r\n\r\n// Switch to the second tab after a few seconds.\r\nsetTimeout(function() {\r\n  tab2.active = true;\r\n  logTabInfo();\r\n\r\n  // Switch back to the first tab after another few seconds.\r\n  setTimeout(function() {\r\n    tabGroup.activeTab = tab1;\r\n    logTabInfo();\r\n  }, 3000);\r\n}, 3000);\r\n{code}\r\n\r\n# Run the application and verify the 1st tab (blue background) is visible.\r\n# The following should be printed to the log:\r\n \"active tab: A tab.\"\r\n \"1st tab active: true\"\r\n \"2nd tab active: false\"\r\n# After 3 seconds the second tab (red background) should become active.\r\n# Verify the following is printed to the log:\r\n \"active tab: Another tab.\"\r\n \"1st tab active: false\"\r\n \"2nd tab active: true\"\r\n# After 3 seconds the first tab (blue background) should become active again.\r\n# Verify the same logs listed in step #2 is printed.\r\n", "attachment": [], "flagged": false, "summary": "BlackBerry: TabGroup.activeTab and Tab.active", "creator": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "409891", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as resolved.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-08T18:25:22.000+0000", "updated": "2017-03-08T18:25:22.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }