[CLOSED] loadRecord doesn't work when formPanel is in Tab

  1. #1

    [CLOSED] loadRecord doesn't work when formPanel is in Tab

    I'm trying to load a formPanel from grid row selection using loadRecord. It doesn't seem to work when the formPanel is inside a tab. If I move it to North or South frame it works fine.

    <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server">
        </ext:ScriptManager>
        <ext:Store ID="Store1" runat="server" ShowWarningOnFailure="true">
            <Reader>
                <ext:JsonReader ReaderID="DocID">
                    <Fields>
                        <ext:RecordField Name="SiteId" Type="Int" />
                        <ext:RecordField Name="DirPath" Type="string" />
                        <ext:RecordField Name="LeafName" Type="string" />
                        <ext:RecordField Name="ParentId" Type="Int" />
                        <ext:RecordField Name="Title" Type="string" />
                        <ext:RecordField Name="LeafType" Type="Int" />
                        <ext:RecordField Name="NavigateURL" Type="string" />
                        <ext:RecordField Name="NavigateURLTarget" Type="string" />
                        <ext:RecordField Name="FolderPath" Type="string" />
                        <ext:RecordField Name="DocNo" Type="string" />
                        <ext:RecordField Name="ImageName" Type="string" />
                        <ext:RecordField Name="FileSize" Type="Int" />
                        <ext:RecordField Name="FileExtension" Type="string" />
                        <ext:RecordField Name="FileContentType" Type="string" />
                        <ext:RecordField Name="Revision" Type="string" />
                        <ext:RecordField Name="RevisionType" Type="string" />
                        <ext:RecordField Name="InsertDate" Type="Date" />
                        <ext:RecordField Name="InsertUserId" Type="string" />
                        <ext:RecordField Name="DocumentActive" Type="Boolean" />
                        <ext:RecordField Name="DocumentActiveDate" Type="Date" />
                        <ext:RecordField Name="DocumentDelete" Type="Boolean" />
                        <ext:RecordField Name="DocumentArchive" Type="Boolean" />
                        <ext:RecordField Name="Comments" Type="string" />
                        <ext:RecordField Name="ModelNo" Type="string" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store>
        
            <ext:ViewPort ID="ViewPort1" runat="server">
                
                <Body>
                    <ext:BorderLayout ID="BorderLayout1" runat="server">
                        <North Collapsible="True" Split="True">
                            <ext:Panel ID="Panel1" runat="server" Height="100" Title="North">
                                
                                <Body>
                                </Body>
                            </ext:Panel>
                        </North>
                        <South Collapsible="true" Split="true">
                            <ext:Panel ID="Panel3" runat="server" Height="100" Title="South">
                                
                                <Body>
                                </Body>
                            </ext:Panel>
                        </South>
                        <West>
                        </West>
                        <Center>
                            <ext:Panel ID="Panel5" runat="server" Title="Center">
                                
                                <Body>
                                    <ext:FitLayout ID="FitLayout2" runat="server">
                                        <ext:TabPanel runat="server" ActiveTabIndex="0" Border="false" Title="Center">
                                            <tabs>
                                                <ext:tab runat="server" Title="Listing">
                                                    
                                                    <body>
                                                        <ext:FitLayout ID="FitLayout3" runat="server">
                                                            <ext:GridPanel runat="server" Frame="true" StoreID="Store1">
                                                                <ColumnModel ID="ColumnModel1" runat="server">
                                                                    <Columns>
                                                                        <ext:Column ColumnID="LeafName" Header="File Name" Width="150" DataIndex="LeafName"
                                                                        />
                                                                        <ext:Column DataIndex="Title" Header="Title" Width="150" />
                                                                        <ext:Column DataIndex="Revision" Header="Revision" Width="150" />
                                                                        <ext:Column DataIndex="ModelNo" Header="Model" Width="150" />
                                                                        <ext:Column DataIndex="DocumentArchive" Header="Archive" Width="100" />
                                                                    </Columns>
                                                                </ColumnModel>
                                                                <SelectionModel>
                                                                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
                                                                        <Listeners>
                                                                            <RowSelect Handler="#{FormPanel1}.getForm().loadRecord(record);" />
                                                                        </Listeners>
                                                                    </ext:RowSelectionModel>
                                                                </SelectionModel>
                                                            </ext:GridPanel>
                                                        </ext:FitLayout>
                                                    </body>
                                                </ext:tab>
                                                <ext:tab runat="server" Title="Document">
                                                    
                                                    <body>
                                                        <ext:FitLayout>
                                                            <ext:FormPanel ID="FormPanel1" runat="server" Title="Form Panel" BodyStyle="padding:5px;"
                                                            ButtonAlign="Right">
                                                                
                                                                <Body>
                                                                    <ext:FormLayout ID="FormLayout1" runat="server">
                                                                        <ext:Anchor Horizontal="95%">
                                                                            <ext:TextField ID="txtDirPath" DataIndex="DirPath" runat="server" FieldLabel="Dir Path"
                                                                            />
                                                                        </ext:Anchor>
                                                                        <ext:Anchor Horizontal="95%">
                                                                            <ext:TextField ID="txtLeafName" DataIndex="LeafName" runat="server" FieldLabel="Leaf Name"
                                                                            />
                                                                        </ext:Anchor>
                                                                    </ext:FormLayout>
                                                                </body>
                                                            </ext:FormPanel>
                                                        </ext:FitLayout>
                                                    </Body>
                                                </ext:tab>
                                                <ext:tab runat="server" Title="Search">
                                                    
                                                    <body>
                                                    </Body>
                                                </ext:tab>
                                            </tabs>
                                        </ext:TabPanel>
                                    </ext:FitLayout>
                                </Body>
                            </ext:Panel>
                        </Center>
                    </ext:BorderLayout>
                </Body>
            </ext:ViewPort>
        
    
    </form>
    Any ideas?

  2. #2

    RE: [CLOSED] loadRecord doesn't work when formPanel is in Tab

    Hi HOWARDJ,

    If you set DeferredRender="true" on the TabPanel, does that solve the problem?


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] loadRecord doesn't work when formPanel is in Tab

    Hi Geoffrey
    I tried adding DeferredRender="true" and it did not fix the problem. Whats a little strange is the textbox fields do not appear in the UI just the FieldLabel only. Yet if I cut &amp; paste same mark-up into South or north, it works fine.
  4. #4

    RE: [CLOSED] loadRecord doesn't work when formPanel is in Tab

    Hi,

    Try to add runat="server" for FitLayout inside second tab (don't forget about DeferredRender="true" on the TabPanel)
  5. #5

    RE: [CLOSED] loadRecord doesn't work when formPanel is in Tab

    Hi Vladsch

    Yes that seems to work, thanks for your help.

Similar Threads

  1. Replies: 2
    Last Post: Sep 15, 2014, 2:58 PM
  2. Replies: 1
    Last Post: Dec 06, 2011, 3:07 AM
  3. FormPanel loadRecord
    By rcaunt in forum 1.x Help
    Replies: 4
    Last Post: Nov 02, 2011, 1:41 PM
  4. Replies: 0
    Last Post: Nov 20, 2009, 6:57 AM
  5. Replies: 5
    Last Post: Aug 06, 2009, 4:46 PM

Posting Permissions