List Widget Issue

2 views
Skip to first unread message

Alice Carback

unread,
Aug 2, 2009, 10:08:17 PM8/2/09
to webos-...@googlegroups.com
There is a high chance I'm just really tired and should got to bed but here's the code I have:

     <div x-mojo-element="List" id="buyCargoList" class="listClass" name="listName"></div>

And this is straight from the SDK website:

    this.controller.setupWidget("buyCargoList",
         this.attributes = {
             itemTemplate: 'listscene/static-list-entry',
             listTemplate: 'listscene/static-list-container',
             addItemLabel: $L('Add ...'),
             swipeToDelete: true,
             reorderable: true,
             emptyTemplate:'list/emptylist'
         },
         this.model = {
             listTitle: $L('List Title'),
             items : [
                {data:$L("Item 1"), year:$L("1974")},
                {data:$L("Item 2"), year:$L("1975")},
                {data:$L("Item 3"), year:$L("1972")},
                {data:$L("Item 4"), year:$L("2003")},
                {data:$L("Item 5"), year:$L("1996")},
                {data:$L("Item 6"), year:$L("1969")},
             ]

         });

I get the following error: "template load failed: listscene/static-list-contianer.html"

Does any one know what I missed?

Many Thanks,
Alice Carback

Pre101

unread,
Aug 2, 2009, 10:16:23 PM8/2/09
to webOS Dev DC
First, I'd delete the listTemplate line altogether. Second, is static-
list-container.html really in listscene?

Roy

Nicholas Carter

unread,
Aug 2, 2009, 10:51:52 PM8/2/09
to webos-...@googlegroups.com
Yeah, the template properties indicate actual paths, relative to the
"app/views" directory. So "listscene" must be an actual dir
Reply all
Reply to author
Forward
0 new messages