Results 1 to 2 of 2

Thread: Automatic reloading own component if a form is shown

  1. #1
    Ext User
    Join Date
    Oct 2008
    Vote Rating

    Question Automatic reloading own component if a form is shown


    in my current application I am trying to work with preconfigured classes.

    I've got a combo-box subclass (MenuComboBox) which uses a JSON store to load its items from a SQL database (php backend).

    I've got a generic editor form (BasicEditor) which consists of a modal window containing a formpanel. BasicEditor contains comon functions for form data submits and error handling.
    I've got several Editor classes which inherit from BasicEditor.
    The editor uses closeAction:'hide' to avoid rebuilding the editor each time it is called.

    My MenuItemEditor class extends BasicEditor and provides the form elements which are shown by BasicEditor. One of the components is a MenuComboBox.
    On first showing the MenuItemEditor the component gets its data from the server - perfect.
    But if I add or remove Menus from the database the entries in MenuComboBox don't change because they just don't know about that...

    So I want to reload the MenuComboBox-items when the editor is shown. The problem now is that the combo box doesn't get a show event or something like that. onRender does not work either because the component is already rendered. I can't register on parent item's show event because in some editors the combo box is inside a tab container...

    Is there a generic method for handling this problem or must I reload the combo box from my editor subclass when it's shown?

  2. #2
    Ext User
    Join Date
    Jul 2007
    Vote Rating


    Presumably you know when you are showing it, so issue a reload to the combo at the same time.
    Ext.Window also fires a "show" event.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts