PDA

View Full Version : store data associated with a component or element



hello
9 Nov 2009, 4:54 PM
can you associate a component or element in ext-js with a arbitrary object?
eg. store(component, 'key', obj), get(component,'key');
I tried Element.set(obj) and Element.getAttribute(key), but it doesn't seem to take non string object well.

thanks

MiamiCoder
9 Nov 2009, 7:59 PM
Can you describe your underlying need? Based on what you say, it looks like you might be creating a complicated solution for a simple problem.

hello
11 Nov 2009, 6:38 AM
I simply need to store data for each child element inside a window. for example, I am making an gui where each element is associated with an edit view, and I want to switch between the view mode and the edit view.
thanks