{ "id": "60644", "key": "TIMOB-12", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "11209", "name": "Release 0.5", "archived": true, "released": true, "releaseDate": "2009-07-09" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:50:06.000+0000", "created": "2011-04-15T02:22:26.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:50:06.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Description

\n

The purpose of this API is to create a section within a grouped\nview. There are three types of sections: option lists (only one\noption can be active), button lists, and input list.

\n

Grouped sections are added to Grouped Views

\n

Example

\n
\nvar buttonData = [\n    {title:'Button 1', image:'images/one.png'},\n    {title:'Button 2', image:'images/two.png'}\n];\n\nvar buttonSection = Titanium.UI.iPhone.createGroupedSection({type:'button',data:buttonData});\nbuttonSection.addEventListener('click',function(e)\n{\n    e.index // index of clicked button\n});\n\nvar optionData = [\n    {title:'Option 1', image:'images/one.png'},\n    {title:'Option 2', image:'images/two.png', selected:true},\n    {title:'Option 3', image:'images/three.png'}    \n];\n\nvar optionSection = Titanium.UI.iPhone.createGroupedSection({type:'option', data:optionData});\noptionSection.addEventListener('click',function(e)\n{\n    e.index // index of clicked button\n});\n\nvar switchInstance = Titanium.UI.createSwitch({value:false});\n\nvar inputData = [\n    {title:'Input 1', image:'images/one.png', input:switchInstance},\n    {title:'Input 2', image:'images/two.png', value:'foo', hasChild:true},\n    {title:'Input 3', image:'images/three.png'} \n];\n\nvar inputSection = Titanium.UI.iPhone.createGroupedSection({type:'input', data:inputData});\ninputSection.addEventListener('click',function(e)\n{\n    e.index // index of row that was clicked (used if you row will create a new window)\n});\n
\n

API Arguments

\n

data : the data object used to create the table\nview

\n

type : the type of grouped section. valid\nvalues are: input, option, and button

\n

Data Object Detail

\n

title : row title

\n

image : optional. path of an image. Images are\nplaced on the far left side of a row

\n

hasChild : optional. valid values are\ntrue|false. indicates that clicking the row will create another\nwindow. the default value is false. also, if hasChild is\ntrue the default \"more icon\" should be displayed (e.g., for iphone\nthe \">\" would be displayed).

\n

value : optional. the text string to be\ndisplayed to the right of the title (in the standard blue font\ncolor)

\n

header : optional. header text for grouped\nsection

\n

footer : optional. footer text for grouped\nsection

\n

selected : optional. valid values are\ntrue|false. this is only used for \"option\" grouped sections.

\n

input : optional instance variable of an input\ncontrol (e.g., checkbox, slider, input field). Note: the callback\nresponsibility falls onto the input control not the table view.

{html}", "attachment": [], "flagged": false, "summary": "API - Titanium.UI.iPhone.createGroupedSection", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "122639", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Implemented as of June 23

{html}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:22:26.000+0000", "updated": "2011-04-15T02:22:26.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }