Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23121] Windows: Bind Ids Reporting as undefined

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2016-03-31T07:16:34.000+0000
Affected Version/sRelease 5.1.0, Release 5.1.2, Release 5.2.1
Fix Version/sn/a
ComponentsWindows
Labelslistview, windows
Reporter Ricardo Ramirez
AssigneeChristopher Williams
Created2016-03-29T21:42:22.000+0000
Updated2017-03-24T18:26:52.000+0000

Description

Issue Description

When clicking on a listitem in a listview the listitemclick event is fired and received, but the bindId property for the element clicked is undefined.

Steps to Replicate

Create a new appcelerator alloy project

Open index.xml and replace the code with the next:

<Alloy>
	<Window class="container">
		<View>
			<ListView id='list' top='0' onItemclick='itemClick'>
				<Templates>
					<ItemTemplate name='foo'>
						<View bindId='fooView' left='8' right='8' top='8' bottom='8' backgroundColor='red'/>
					</ItemTemplate>
				</Templates>
			</ListView>
		</View>
	</Window>
</Alloy>

Open index.tss and replace the code with the next:

".container": {
	backgroundColor:"white"
}

"Label": {
	color: "#000"
}

"#label": {
	font: {
		fontSize: 12
	}
}

Index.js

var currentClickedIndex = -1;

function itemClick(evt){
	alert(evt.bindId);
}

var listItems = [];

for(var ii = 0; ii < 20; ii++){
	listItems.push({
		template : 'foo',
		properties : {
			height : 80
		}
	});
}

$.list.sections = [Ti.UI.createListSection({
	items : listItems
})];

$.index.open();

Run for windows device or simulator

click on any list item

The BindId is undefined

** This is working on Android.

Attachments

FileDateSize
image.png2016-03-29T21:42:09.000+000011755

Comments

  1. Christopher Williams 2016-03-30

    I believe this is a duplicate of TIMOB-20601
  2. Ricardo Ramirez 2016-03-30

    yes, it looks like the same issue
  3. Kota Iguchi 2016-03-31

    duplicate of TIMOB-20601
  4. Lee Morris 2017-03-24

    Closing ticket as duplicate with reference to the linked issues.

JSON Source