[CLOSED] FormPanel in a Tabpanel

  1. #1

    [CLOSED] FormPanel in a Tabpanel

    Hi,

    I have a data capturing form that comprises a Tabpanel with two tabs. The each of the tabs contains a FormPanel that I am using to submit data to a gridpanel that is bound to a store which then does the final submissions to the database.
    The form was working fine with Coolite version 0.8 community edition, but after we upgraded to EXT.NET version 1.0 professional edition it no longer functions as expected.

    This is the exact problem from the analysis and debugging I have done. I am not able to access values from the formpanel in the second tab and it therefore gives me a javascript error saying 'object does not support this method or property' when execute the following javascript code from my page 'MyFormPanel2.form.loadRecord(record);' When i comment that line out, i receive no error but of course am not able to read my values from the formpanel. However the FormPanel in the first tab works fine and if I take out the first tab such that the second tab is the only tab in my form it works fine too.

    Has anyone encountered such a problem and therefore knows how to solve it. Please assist, all comments and assistance are highly appreciated.
    Last edited by geoffrey.mcgill; Sep 22, 2010 at 6:51 AM. Reason: [CLOSED]
  2. #2
    Hi All,

    I am yet to find a final solution with the Form but am still doing further tests and analysis. From my tests so far I think the main problem lies with the TabPanel and its Tabs. This is an issue that wasnt in coolite version 0.8 but I think was introduced in EXT.NET.

    For the tabpanel, I have discovered that it initializes its child controls upon receiving focus or being selected i.e. if I open my new form to enter new records then i select each of the tabs without doing anything I can perform my desired functions without any errors, but if am only interested in capturing fields in the first tab only which means I wont click any other additional tabs, the form throws the javascript error I had mentioned before. It therefore isnt an issue that affects the FormPanel alone, it also affects any other child controls that are in the hidden tabs that you might attempt to access or set their values.

    I have therefore been forced to write my javascript code as follows as a temporary work around.

    MyTabPanel.setActiveTab('tab1');
    MyTabPanel.setActiveTab('tab2');
    MyWindow.show();
    This ensures that all tabs have recieved some focus before the window finally opens and that seems to work for now. However it doesnt seem like a good solution and I didnt need to do that while using Coolite version 0.8 community edition.

    All comments and assistance will be highly appreciated.
    Last edited by Daniil; Sep 21, 2010 at 12:11 PM. Reason: Please use [code] tags
  3. #3
    The following thread may provide some related information, see

    http://forums.ext.net/showthread.php...ll=1#post40518

    Maybe setting DeferredRender="false" on the <ext:TabPanel> will help.

    If none of this helps, please post a code sample demonstrating how we can reproduce the problem locally.
    Geoffrey McGill
    Founder
  4. #4
    Thanx a lot Geoffrey, that solves the problem.

Similar Threads

  1. [CLOSED] FormPanel within TabPanel layout/style problems
    By machinableed in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 25, 2012, 12:17 PM
  2. TabPanel validation without FormPanel inside
    By AlexMaslakov in forum 1.x Help
    Replies: 5
    Last Post: Sep 09, 2011, 9:20 AM
  3. Replies: 0
    Last Post: Aug 18, 2011, 4:08 AM
  4. Replies: 1
    Last Post: Dec 06, 2010, 8:51 AM
  5. TabPanel in Formpanel
    By Richardt in forum 1.x Help
    Replies: 1
    Last Post: Sep 30, 2010, 5:56 PM

Posting Permissions