Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Multiple collection resources for tableview

$
0
0

I am implementing a window that have two different data resources using tableview, namely A and B. Method 1:

<Alloy>
<Window>
    <Collection src="As">
    <Collection src="Bs">
        <TableView dataCollection = "As">
        //...code goes here
    </TableView>
    <TableView dataCollection = "Bs">
        //...code goes here
    </TableView>
</Window>
</Alloy>

Which it just show up the second tableview, so I guess that I am not allowed to have 2 tableviews within a window?

Method 2:

<Alloy>
<Window>
    <Collection src="As">
    <Collection src="Bs">
        <TableView>
        <TableViewSection dataCollection = "As">
        //...code goes here
        </TableViewSection>
        <TableViewSection dataCollection = "Bs">
        //...code goes here
        </TableViewSection>
    </TableView>
</Window>
</Alloy>

Which won't even compile and pass to run the simulator. The error is as following:

[ERROR] :  
[ERROR] :  (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:189:18)
[ERROR] :  (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:197:11)
[ERROR] :  (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:664:9)
[ERROR] :  Alloy compiler failed

I found a similar post on the Q&A history but the improvement mentioned seems still open to be solve. https://developer.appcelerator.com/question/148128/alloy-binding-data-collections-to-tableviewsections

So I wonder if anyone may knows the way for implementing the above structure. Thank you so much in advance!!!


Viewing all articles
Browse latest Browse all 8068

Trending Articles