I use a MySQL db so the many to many relations I use are implemented
using an intermediate table containing two foreign keys referencing
two other tables. I need to add a user interface that lets application
admin types manage these relationships properly, easily and with
minimum chance of user error.

I did not see a widget for this except the one intended for
multiple=true meant for use with GAE which does not use the extra
table in the middle.

I found this jQuery plugin which might be a decent starting point

http://plugins.jquery.com/project/DualListbox

In my experience with many to many relations, it is typical to start
at one side of the relation and pin that side to a specific entry in
the table. Then using a dual list, one list contains all the possible
non members from the other end of the many to many and the other list
contains the current membership. The items in the two lists are then
moved between the lists until the new membership is correct and on
submit the current values in the list representing membership is
balanced against the join table and adds and deletes are performed to
get a match.

Does this look like a reasonable approach?

Thanks

Ron

Reply via email to