Quantcast
Viewing all articles
Browse latest Browse all 5

Is nesting of gives a problem?

I have written a code which includes nesting of views, It doesn't work for some reason. can anyone help me here? I have a click event on lable, its not getting fired when user clicks on it, and even 2nd view is not displaying at all.

<ListView id="productListView"  defaultItemTemplate="generic" top="50" >
            <Templates>
                <ItemTemplate id="generic" name="generic" class="generic">
                    <View id="textContainer" layout="vertical">
                        <View layout="horizonal">
                            <ImageView id="image" bindId="image" />
                            <Label id="productLabel" bindId="productLabel" class="title"  onClick="doPreview"></Label>
                            <Button id="button" onClick="addToCompare" bottom="0">Compare</Button>  
                        </View> 
                        <View layout="horizonal">
                            <Label id="description">Some desc</Label>
                        </View>
                    </View>                 
                </ItemTemplate>
            </Templates>
            <!-- we only have one section and the items are contstucted using template -->
            <ListSection id="productsSection" >
                <ListItem template="generic" />
            </ListSection>
        </ListView>

Viewing all articles
Browse latest Browse all 5

Trending Articles