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

Alloy collection instance tag doesn't work.

$
0
0

Hi!

I'm going to show populated collection instance like so (main.xml):

<Alloy>
    <Collection src="contact" instance="true" id="contactCollection"/>
    <Window id="addressee">
 
        <Require src="contacts/base" id="contacts"/>
 
    </Window>
</Alloy>
The require tag contains of (contacts/base.xml):
<TableView id="list" dataCollection="contact" dataTransform="transformContacts" dataFilter="filterContacts">
        <TableViewRow id="row" data="{model_id}" onClick="add_User_In_Mail_List">
            <!--Require src="contacts/contact/base" /-->
            <ImageView  id="image"      image="{image}" />
            <ImageView  id="status"     image="{status}"/>
            <Label      id="title"      text= "{name}"  />
            <Switch     id="switchbox"  value="false"   onChange="outputState" data="{model_id}" />
        </TableViewRow>
    </TableView>
Collection instance contact has been already populated and has length of 102 models. (It's checked in contacts/base.js via console.log(Alloy.Collections.contact.length);)

I do not want to force and make Alloy.Collections.contact.fetch() twice.

Please explain me where I'm wrong!


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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