如何使用多个桌子的Lawnchair? [英] How do I use Lawnchair with more than one table?

查看:257
本文介绍了如何使用多个桌子的Lawnchair?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Lawnchair(http://westcoastlogic.com/lawnchair/)进行移动项目来存储有关不同事物的信息。我需要存储多个表格。

I am trying to use Lawnchair (http://westcoastlogic.com/lawnchair/) for a mobile project to store information about different things. I need to store in more than more table.

var people = new Lawnchair('people');

var groups = new Lawnchair('groups');

这不完全有效,它会尝试将人员表中的内容复制到组表。我已经尝试动态设置people.adapter.table,这也会导致类似的问题。我开始认为不可能有一张桌子和Lawnchair ..

This does not completely work, it tries to copy contents from the people table to the group table. I have tried setting people.adapter.table on the fly which also results in a similar issue. I'm beginning to think it is not possible to have more than one table with Lawnchair..

任何帮助?

推荐答案

您应该在Lawnchair实例上设置名称选项:

You should set the 'name' option on your Lawnchair instances:

var people = new Lawnchair({name: "people"}, function(){});

var groups = new Lawnchair({name: "groups"}, function(){});

-Marc

这篇关于如何使用多个桌子的Lawnchair?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆