Refresh page (tabpanel)

Page 1 of 2 12 LastLast
  1. #1

    Refresh page (tabpanel)

    Hi,

    I use the next code to add new tabs (pages) in a tabpanel:

    <ext:Panel ID="pnlCodesAndTypes" runat="server" Title="Codes & Types" Collapsed="true" Collapsible="true" AutoHeight="true" Icon="Outline" >
          <Body>
                <ext:FitLayout ID="FitLayout2" runat="server">
                      <ext:TreePanel ID="TreePanel2" AutoScroll="true" EnableViewState="false" ContainerScroll="true"
                      UseArrows="true" RootVisible="false" Animate="false" BufferResize="true" runat="server"
                      Border="false" BodyBorder="false" EnableDrag="false" EnableDrop="false" >
                            <Root>
                                  <ext:TreeNode Text="nodeCodesAndTypes" Expanded="true">
                                        <Nodes>
                                              <ext:TreeNode Text="CodesAndTypes" Expanded="true" Icon="BulletRight" >
                                                    <Nodes>
                                                          <ext:TreeNode Text="My page" Icon="BulletBlue" Href="MyPage.aspx" />
                                                    </Nodes>
                                               </ext:TreeNode>
                                        </Nodes>
                                  </ext:TreeNode>
                            </Root>
                            <Listeners>
                                  <Click Handler="if(node.attributes.href){e.stopEvent();loadPage(#{PortalTabPanel}, node);}" />
                            </Listeners>
                      </ext:TreePanel>
                </ext:FitLayout>
          </Body>
          <AjaxEvents>
                <Expand OnEvent="OnpnlCodesAndTypesExpand" />
          </AjaxEvents>
    </ext:Panel>
    and

    <ext:TabPanel 
    ID="PortalTabPanel" 
    runat="server" 
    Title="TabPanel" 
    ActiveTabIndex="0" 
    Border="false" 
    EnableTabScroll="true"
    BodyStyle="background-color: #4D778B; border: 1px solid #AABBCC; border-top: none;">
          <Tabs>
                <ext:Tab ID="Tab1" runat="server" Title="Home" BodyStyle="background-color: transparent;" >
                      <Body>
                            <ext:Portal ID="PortalAbaco" runat="server" Border="false" BodyStyle="background-color: transparent;">
                                  <Body>
                                        <center></center>
                                  </Body>
                            </ext:Portal>
                      </Body>
                </ext:Tab>
          </Tabs>
    </ext:TabPanel>
    If I open Mypage.aspx clicing on the "My page" treepanel option, I close it and I open it again, the second time that I open the page it isn't reload again the content. What can I do to solve this problem? I couldn't find a solution and all pages(tabs) always show the content of the first time I opened them.

    Regards and thank you in advance.

    (Could you move this threat to Help Forum, please? I only can open new threaths in this forum and I don't know why. Thank you.)
  2. #2
    Quote Originally Posted by Kaido View Post
    (Could you move this threat to Help Forum, please? I only can open new threaths in this forum and I don't know why. Thank you.)
    Hi Kaido,

    Ok, I moved this.
    Please clarify is there any error when you're trying to create a new thread in the Help forum?
    Could you provide a screen-shot?

    If I open Mypage.aspx clicing on the "My page" treepanel option, I close it and I open it again, the second time that I open the page it isn't reload again the content. What can I do to solve this problem? I couldn't find a solution and all pages(tabs) always show the content of the first time I opened them.
    Could you provide us with the code of loadPage() function?
  3. #3
    Hi, Daniil.

    thank you for your help :)

    When I'm logged and try to open a new thread in the help forum always it shows me this text:

    You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

    1. You are not logged in. Fill in the form at the bottom of this page and try again.
    2. You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
    3. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

    But I'm logged and this account is very old. I think that is because I don't have sufficient privileges but this forum is for everybody so I don't understand why. I have had the same problem to answer this thread because the same text was showed when I tried to reply my own post. I achieved answer you clic on "Reply With Quote" option. (I sent a email some weeks ago to explain it).

    About the thread:

    In the index page, where this code is written, my pageload funcion is empty. And in "MyPage.aspx" pageload there is a load store function. But the problem is that the second time that I open the page (tab) when I'm debuging it isn't enter in the pageLoad (the page isn't reloaded).

    For example.
    - I open the tab (first time).
    - I work in this page, I upload the content, save the changes in the db, show the new content in this page and after I close it.
    - I open the tab again (second time) but I don't see the new content, I see the old content (Does it have any kind of cache memory to do that?) When I debug, I see that the page isn't reloaded when I clic on "My page" option to open it again.

    I hope I've explained that clearly
  4. #4
    Quote Originally Posted by Kaido View Post
    Hi, Daniil.

    thank you for your help :)

    When I'm logged and try to open a new thread in the help forum always it shows me this text:




    But I'm logged and this account is very old. I think that is because I don't have sufficient privileges but this forum is for everybody so I don't understand why. I have had the same problem to answer this thread because the same text was showed when I tried to reply my own post. I achieved answer you clic on "Reply With Quote" option. (I sent a email some weeks ago to explain it).
    Seems the similar issue was on the forums with the old engine. But I have not faced this using the new forums.
    We'll check your account.

    Quote Originally Posted by Kaido View Post
    About the thread:

    In the index page, where this code is written, my pageload funcion is empty. And in "MyPage.aspx" pageload there is a load store function. But the problem is that the second time that I open the page (tab) when I'm debuging it isn't enter in the pageLoad (the page isn't reloaded).

    For example.
    - I open the tab (first time).
    - I work in this page, I upload the content, save the changes in the db, show the new content in this page and after I close it.
    - I open the tab again (second time) but I don't see the new content, I see the old content (Does it have any kind of cache memory to do that?) When I debug, I see that the page isn't reloaded when I clic on "My page" option to open it again.

    I hope I've explained that clearly
    It's clear now but I was unable to reproduce the issue.

    Could you provide us with the code of loadPage() function?
    I still need to look at this.

    Could you provide us with a sample code which we can run without any changes?

    Please look at Code Sample Templates here
    http://forums.ext.net/showthread.php...ation-Required
  5. #5
    Quote Originally Posted by Daniil View Post
    Seems the similar issue was on the forums with the old engine. But I have not faced this using the new forums.
    We'll check your account.
    Thank you :)

    Sorry, I wrote about the PageLoad method and you asked about LoadPage function that I used in the aspx page :o I am a little embarrassed hehe

    This is a basic example:

     
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="MyProject.index" %>
    <%@ Import Namespace="Coolite.Utilities" %>
    <%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
        <link rel="Stylesheet" href="../extjs/resources/css/ext-all.css" />
        <ext:ScriptContainer ID="ScriptContainer1" runat="server" />
     
        <script type="text/javascript">
     
            var loadPage = function (tabPanel, node) {
                var tab = tabPanel.getItem(node.text);
                if (!tab) {
                    tab = tabPanel.add({
                        id: node.text,
                        title: node.text,
                        closable: true,
                        autoLoad: {
                            showMask: false,
                            url: node.attributes.href,
                            mode: 'iframe',
                            maskMsg: '<asp:Localize runat="server" Text="Loading..." /> ' + node.text + '...'
                        }
                    });
                }
                tabPanel.setActiveTab(tab);
            }
        </script>
    </head>
    <body>
     
        <form id="form1" runat="server">
            <ext:ScriptManager ID="sm" runat="server" StateProvider="None"> 
        </ext:ScriptManager> 
     
            <ext:ViewPort ID="VPAbaco" runat="server" StyleSpec="background-color: transparent;">
                <Body>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <North />
                    <West Collapsible="true" Split="true" MinWidth="120" MaxWidth="400" MarginsSummary="0 0 0 0"
                        CMarginsSummary="0 0 0 0">
                        <ext:Panel runat="server" Title="MENU" 
                            Width="235" ID="pnlSettings" BodyBorder="false" BodyStyle="background-color: #284051;">
                            <Body>
     
                                <ext:Panel ID="pnlCT" runat="server" Title="Example" Collapsed="true" Collapsible="true" AutoHeight="true" >
                                    <Body>
                                        <ext:FitLayout ID="FitLayout2" runat="server">
                                            <ext:TreePanel ID="TreePanel2" AutoScroll="true" EnableViewState="false" ContainerScroll="true"
                                                UseArrows="true" RootVisible="false" Animate="false" BufferResize="true" runat="server"
                                                Border="false" BodyBorder="false" EnableDrag="false" EnableDrop="false">
                                                <Root>
                                                    <ext:TreeNode Text="Example" Expanded="true">
                                                        <Nodes>
                                                            <ext:TreeNode Text="MyPage" Icon="BulletBlue" Href="MyPage.aspx" />
                                                        </Nodes>
                                                    </ext:TreeNode>
                                                </Root>
                                                <Listeners>
                                                    <Click Handler="if(node.attributes.href){e.stopEvent();loadPage(#{PortalTabPanel}, node);}" />
                                                </Listeners>
                                            </ext:TreePanel>
     
                                        </ext:FitLayout>
                                    </Body>
                                </ext:Panel>
                                <ext:Panel ID="pnlBottomM" runat="server" Height="3" />
                            </Body>
     
                        </ext:Panel>
                    </West>
                    <Center MarginsSummary="5 5 5 0">
                            <ext:TabPanel  ID="PortalTabPanel"  runat="server"  Title="TabPanel" ActiveTabIndex="0" Border="false" BodyStyle="background-color: #4D778B; border: 1px solid #AABBCC; border-top: none;">
                                <Tabs>
                                    <ext:Tab ID="Tab1" runat="server" Title="Home" BodyStyle="background-color: transparent;">
                                        <Body>
                                            <ext:Portal ID="PA" runat="server" Border="false" BodyStyle="background-color: transparent;">
                                                <Body>
                                                </Body>
                                            </ext:Portal>
                                        </Body>
                                    </ext:Tab>
                                </Tabs>
                            </ext:TabPanel> 
                        </Center>
               </ext:BorderLayout>
               </Body>
            </ext:ViewPort>
        </form>
    </body>
    </html>
    You can remplace MyPage.aspx with another aspx page to try it.
  6. #6
    Hi,

    Thank you for the example.

    I would suggest you to add an example like this one that you posted in a thread's initial post because it saves our time and give you a good chance to get a quick solution for your issue.

    Concerning the thread.

    Unfortunately I still can't reproduce the problem using your code and some MyPage.aspx.

    More details are required.

    Could you also post the code of MyPage.aspx?

    What browsers do you use to test?
    Last edited by Daniil; Oct 28, 2010 at 5:20 PM.
  7. #7
    Quote Originally Posted by Daniil View Post
    Seems the similar issue was on the forums with the old engine. But I have not faced this using the new forums.
    We'll check your account.
    We have checked your account. All settings appear to be correct.
    Please ensure that you're trying to create a new thread in the Help forum, not Premium Help forum.
    Also ensure that you are logged in.
    Just it's very strange issue. There are no separate permissions to create a new thread in Help forum and the Examples and Extras forum.
    Your account is marked with permissions to post in Help forum.

    Please try again
    http://forums.ext.net/forumdisplay.php?4-Help
  8. #8
    Hi, Daniil:

    I continue with the same problem. I clic on your link and the same text appear. When I login me using this page, the application said me: "Thank you for Login... bla bla bla" and when it redirect me to post the new thread the same text appear again:
    You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

    1. You are not logged in. Fill in the form at the bottom of this page and try again.
    2. You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
    3. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
    It's always the same.
    The only one difference is that I could reply this thread using "Reply to Thread" option instead of "Reply with quote" option.
    Last edited by Kaido; Oct 28, 2010 at 8:08 AM.
  9. #9
    Quote Originally Posted by Daniil View Post
    Hi,

    Thank you for the example.
    I would suggest you to add an example like this one that you posted in a thread's initial post because it saves our time and give you a good chance to get a quick solution for your issue.

    Concerning the thread.
    Unfortunately I still can't reproduce the problem using your code and some MyPage.aspx.

    More details are required.
    Could you also post the code of MyPage.aspx?
    What browsers do you use to test?
    Thank you for your help, Daniil.

    I'm using Internet Explorer 8.

    Example MyPage.aspx:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyPage.aspx.cs" Inherits="UserInterface.Web.MyPage" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
     
    <html  xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>My page</title>
        <link rel="stylesheet" href="../../extjs/resources/css/xtheme-slate.css" />
    </head>
    <body>
        <form id="form" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" /> 
            <ext:ViewPort ID="ViewPort1" runat="server" >
            <Body>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <North MarginsSummary="2 2 2 2" Collapsible="false" CollapseMode="Default">
     
                    </North>
                    <Center MarginsSummary="0 0 2 2">
                        <ext:Panel ID="PanelTest" Title="Documents" runat="server" Frame="true" Icon="BookOpenMark" Collapsible="true" Header="false">
                            <Body>
                                <ext:TextField ID="txtDate" runat="server" />
                            </Body>
                         </ext:Panel>
                    </Center>
                </ext:BorderLayout>
             </Body>
             </ext:ViewPort>
        </form>
    </body>
    </html>
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Coolite.Ext.Web;
     
    namespace UserInterface.Web
    {
        public partial class MyPage : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                this.txtDate.Text = DateTime.Now.ToString();
            }
        }
    }
    This is a simple example to explain it.

    If you open the tab(page) it shows the current datetime info. The second time that you open the page It should show a new info (See page_load method) but it always shows the first datetime info.

    I tried to modify tree panel properties, grid panel properties, tag panel propierties, etc... And I didn't find any solution.

    Can you debug "MyPage.aspx" the second time that you open it using the tabpanel?


    *Note: I replied about my login problems in the previous post.
    Last edited by Kaido; Oct 28, 2010 at 8:19 AM.
  10. #10
    Quote Originally Posted by Kaido View Post
    Hi, Daniil:

    I continue with the same problem. I clic on your link and the same text appear. When I login me using this page, the application said me: "Thank you for Login... bla bla bla" and when it redirect me to post the new thread the same text appear again:

    It's always the same.
    The only one difference is that I could reply this thread using "Reply to Thread" option instead of "Reply with quote" option.
    Please clarify does it persist under different browsers?
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: Sep 08, 2013, 5:10 AM
  2. [CLOSED] V2.1 TabPanel and Refresh Help
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Aug 13, 2012, 9:45 AM
  3. Refresh content page only
    By macmilanfly in forum 1.x Help
    Replies: 0
    Last Post: Jul 19, 2012, 6:36 AM
  4. Async refresh page
    By fangmdu in forum 2.x Help
    Replies: 1
    Last Post: Jul 02, 2012, 8:03 PM
  5. Refresh combobox in iFrame from TabPanel
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Nov 15, 2009, 3:26 PM

Posting Permissions