Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-3873

ListItem property values from BindId no longer work after Appcelerator update.

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: Appcelerator Studio 4.5.0
    • Component/s: Alloy
    • Labels:
      None
    • Environment:

      OS X 10.11.5, Appcelerator Studio 4.6.0 and Appcelerator SDK 5.3.0 GA

      Description

      I have a ListItem object in a ListView that I use data binding to bind some runtime properties to the item. Before updating Appcelerator everything worked great. However, when I installed the latest build for Appcelerator (4.6.0) I found that some of the properties were not being respected.

      Specifically the right and left properties are now ignored at runtime thus throwing off my alignment. Below I have a code excerpt showing ListItem template and the data binding so you can see what is going on.

      // Data Binding for list item

      <ListView id="messagesListView" defaultItemTemplate="textMessage" onItemclick="messageClickHandler" backgroundColor="transparent">
      <Templates>
      <ItemTemplate name="textMessage">
      <View width="Ti.UI.FULL" height="Ti.UI.SIZE">
      <View bindId="container" width="Ti.UI.SIZE">
      <Label class="messageText font17" bindId="message" width="Ti.UI.SIZE" height="Ti.UI.SIZE" />
      </View>
      </View>
      </ItemTemplate>
      </Templates>
      <ListSection id="messagesList" dataTransform="transformMessage" dataCollection="messages" dataFunction="updateMessagesList">
      <ListItem
      template="

      { template }

      "
      message:text="

      { messageBody }

      "
      message:color="

      { messageColor }

      "
      container:backgroundColor="

      { backgroundColor }

      "
      container:left="

      { containerLeft }

      "
      container:right="

      { containerRight }

      " />
      </ListSection>
      <RefreshControl id="refreshControl" platform="ios" />
      </ListView>

      Prior to the update the layout above would create a little bubble that would show on either left or right of the screen conditionally. Now the bubbles only show on the left. The reason for the incorrect layout if because the "container:left" and "container:right" properties are being ignored. When I remove these properties from the data binding and manually set them in the template my layout works as expected.

      Also, please note I have removed all layout code that is not relevant to the problem. At the end of the day the "container:left" and "container:right" properties are being ignored now. Any ideas what is going on here?

        Attachments

          Activity

            People

            • Assignee:
              shossain Shak Hossain
              Reporter:
              miken01 Mike Neill
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code