I think you need to revise your model a little.  Get rid of the
'list:reference tag' and replace it with db.tag.  Then add a
db.data.tags.requires as described here:  
http://www.web2py.com/book/default/chapter/07#Validators

Look for the IS_IN_DB validator.

One clue that you have a model problem is if you see the tag ids
rather than the tag names when you use the db admin interface to add
an item to the 'data' table.

I have learned the hard way that you should validate your models using
the admin interface before you start fiddling with controllers.  If
something behaves in an unexpected way in the admin interface, fix it
before continuing.  You can compensate for model problems in your
controllers, but all that does is burn time and cause you to create
unnecessary code.

On Aug 20, 2:24 am, Noel Villamor <noe...@gmail.com> wrote:
> My model has two tables:
> db.define_table('tag', Field('name'))
> db.define_table('data', Field('title'), Field('tags','list:reference
> tag'))
>
> My view for data table has a callback:
> {{=form}}
> ...
> ajax(".../tagcallback", ["tags"], ...)
>
> In my tagcallback controller:
> tags = request.vars.tags
> ...
>
> It seems that tags is not a list type anymore and the '|' separators
> are gone. How do I approach this so that I can do list operations on
> the tags in my tagcallback controller?

Reply via email to