Titanium JIRA Archive
Alloy (ALOY)

[ALOY-713] TabbedBar not showing in data bound TableViewRow

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-08-01T16:47:11.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.3.0
ComponentsModels, Runtime, Titanium SDK
Labelsqe-testadded
ReporterTony Lukasavage
AssigneeTony Lukasavage
Created2013-06-19T14:07:43.000+0000
Updated2013-10-11T20:40:12.000+0000

Description

problem

In the following test case, the TabbedBar will not show in the data bound TableViewRows. It does however show up when data binding is removed. Upon inspection of the generated code, it appears that the Labels array is not being generated.
var __alloyId10 = [];
var __alloyId17 = Ti.UI.iOS.createTabbedBar({
    labels: __alloyId10,
    left: "50",
    top: "10"
});

test case

app/alloy.js

var feed = Alloy.Collections.feed = new Backbone.Collection();
feed.reset([
	{first:'first',second:'second',third:'third',fourth:'fourth'},
	{first:'first',second:'second',third:'third',fourth:'fourth'},
	{first:'first',second:'second',third:'third',fourth:'fourth'},
	{first:'first',second:'second',third:'third',fourth:'fourth'},
	{first:'first',second:'second',third:'third',fourth:'fourth'}
]);

index.xml

<Alloy>
    <Window layout="horizontal">
        <View class="container">
            <TableView dataCollection="feed" top="10" separatorColor="#ffffff" height="600">
                <TableViewRow height="200">
                    <Label text="first" align="left" left="10"/>
                    <TabbedBar left="50" top="10">
                        <Labels>
                            <Label>TAB1</Label>
                            <Label>TAB2</Label>
                            <Label>TAB3</Label>
                        </Labels>
                    </TabbedBar>
                </TableViewRow>
                <TableViewRow>
                    <Label text="second"/>
                </TableViewRow>
                <TableViewRow>
                    <Label text="third"/>
                </TableViewRow>
                <TableViewRow>
                    <Label text="fourth"/>
                </TableViewRow>
            </TableView>
        </View>
    </Window>
</Alloy>

index.js

$.index.open();

Alloy.Collections.feed.trigger('change');

Comments

  1. Tony Lukasavage 2013-08-01

    PR: https://github.com/appcelerator/alloy/pull/207 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-713 functional testing can pass by doing the following:

    run the app on ios

    confirm that it loads without error

    confirm that the tabbedbars appear in each "first row"

    confirm that the buttons in each tabbedbar reflect the static and bound values that are expected. In this case, they should be "tab 1", "fourth", and "tab 3" respectively.

  2. Federico Casali 2013-10-11

    Verified fixed. Alloy 1.3.0 CLI 3.2.0 TiSDK 3.2.0.v20131010163242 Titanium Studio 3.1.4 Closing

JSON Source