[CLOSED] ids and multiple instances of the same UI

  1. #1

    [CLOSED] ids and multiple instances of the same UI

    Problem: I have an application where I want to open multiple windows with the same UI but different data.

    What is the best way to handle this in order to avoid any problems with duplicate ids? I still have to write Javascript for events and accessing the ui objects is a must.

    I've seen some posts on the extjs forums where some of the support fellows suggested that they don't even bother setting the ids but they keep track of object references.

    One thing I noticed is that the ids of the components are used to generate properties of the window object that reference the corresponding extjs objects.

    I also experimented with IDMode property. One can get the ids to include the top parent id concatenated with the component id. I still don't like this.

    I am not too sure what role ItemId plays.

    In my mind the best thing would be to somehow wrap the ui that I want to re-use within the context of a specific object other than the window object but I am not too sure it is possible.

    Any suggestions?

    Thank you

    Update:

    This is a great video on this subject by Jay Garcia: http://vimeo.com/14816550. Towards the end he talks about patterns that can be used, such as ItemId (now I understand ItemId) or ref as an alternative to using ids. Here you can find the code samples he showed in the video: https://github.com/tdgi/screencast-Ext.getCmp

    I am still fuzzy though about ext.net. In the video everything was JavaScript and they defined JavaScript "classes" using the patterns that ExtJs offers.
    Last edited by Daniil; Jul 29, 2011 at 4:26 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Can you provide more details about how do you create similar widgets and at what momennt (where) you have to access to widgets?
    If you post some test sample then i will be able to change it for demonstrating ItemId and Ref
  3. #3
    No need. You can close the thread. I think either ItemId or Ref will do the trick for what I want.

Similar Threads

  1. Replies: 10
    Last Post: Jul 27, 2012, 2:05 PM
  2. Replies: 5
    Last Post: Apr 16, 2012, 9:17 PM
  3. [CLOSED] Multiple Editors - Multiple Instances?
    By jwf in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 09, 2011, 5:45 PM
  4. multiple instances of the same panel
    By costab in forum 1.x Help
    Replies: 3
    Last Post: May 30, 2011, 4:46 PM
  5. Replies: 2
    Last Post: Jun 19, 2009, 2:49 PM

Posting Permissions