PDA

View Full Version : How to prevent duplicate id



gnagno
21 Jan 2015, 2:53 PM
Hi guys,
i'm using ext js 3.4.

I had a problem because I had two objects with the same ID.

Is there something that can check, when i create a new obj, if the id is already present in Ext?

I noticed that in the 4.1 there is it in dev mode. And in 3.4?

lumberjack
23 Jan 2015, 7:37 AM
Best bet: don't assign static ids. Instead, use the itemId config.

You could use Ext.getCmp() to retrieve any existing component with a provided id.

Regards,
Brian

h0i