Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23121

Windows: Bind Ids Reporting as undefined

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Duplicate
    • Affects Version/s: Release 5.1.0, Release 5.1.2, Release 5.2.1
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:
    • Environment:

      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
      1. Create a new appcelerator alloy project
      2. 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>
        

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

        ".container": {
        	backgroundColor:"white"
        }
         
        "Label": {
        	color: "#000"
        }
         
        "#label": {
        	font: {
        		fontSize: 12
        	}
        }
        

      4. 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();
        

      5. Run for windows device or simulator
      6. click on any list item
      7. The BindId is undefined
        • This is working on Android.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                rramirez Ricardo Ramirez
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-9576
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code