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

Collection Element tutorial example

$
0
0

Hi,

i try to execute the tutorial example, but the code didn't display any result why ??

index.xml

<Alloy>
    <Collection src="book" />
    <Window>
        <TableView id="table" />
    </Window>
</Alloy>
index.js
var library = Alloy.Collections.book;
 
// added new row 
var b = Alloy.createModel('book', { 
   title : 'Great Expectations', 
   author: 'Charles Dickens' 
});
library.add(b); 
b.save();
 
library.fetch();
$.index.open();
what is the fetch function done !!!

Note

  • i create new model (book) contain two element title and author

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>