Skip to main content

dojo_table5 : Warning. Attempt to add record to dojo.table. with duplicate

1 reply [Last post]
Joined: 2006-01-31

Hi ,

I have a page which contains 2 tables.In one table if I select a row, then the 2nd table should be updated correspondingly.But what happens is when I publish to /table/clear, both the tables are getting cleared.

So how can I write the code such that basing on a topic published, the contents of this table should be cleared and new data should be populated in the table with the other table with out getting effected.

What I have in code is , a dojo table widget publishes to a topic.Correspondingly in glue.js , there is function which subscribes to above topic and then publishes to another topic which should contain code to populate data in other table.

What I am seing when I try to do this is seeing the warning dojo_table5 : Warning. Attempt to add record to dojo.table. with duplicate row id: undefined. Autogenerating new id.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-07-31

The best way to handle this is to give different subscribe topics to each table:


Table 1:

Table 2:

Now when you want to interact with the first table you can do something like:

jmaki.publish("/table1/clear", {}) ;

Only the first table should be cleared.

You might also want to consider having separate publish topics for the tables if you are using that as well.

Hope this helps,