[CLOSED] Breaking changes on TabPanel ActiveTab

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Breaking changes on TabPanel ActiveTab



    Hi guys,

    I notice some changes on the revision (471) I've just downloaded and started using.
    It was related to ActiveTab that now is and Coolite.Ext.Web.Tab instead of hold just the index.

    I've done the changes on my code to use the new revision. It is to use SetActiveTab on codebehind and ActiveTabIndex on aspx instead on ActiveTab.

    The only problem I am facing is that I need to hold viewstate for the tab currently selected and of course set it again after postback without any explicit command code. By "without any explicit command code" I meant not having to SetActiveTab for each roundtrip to the server.
    Let me explain:

    The tabs are inside an UpdatePanel. Let say for the first time the first tab get loaded either I put the ActiveTabIndex on aspx or not. Ok, then I change the tab and postback some data inside the second Tab. When the content refreshes after the roundtrip the first tab get selected again.

    How is the best way to accomplish it?

    Thanks.

    Leo.
  2. #2

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab



    Hi Leo,

    The .ActiveTab property was renamed to .ActiveTabIndex in v0.6. The following forum post (List item #5) details the breaking change, see http://forums.ext.net/showthread.php...1404-12-1.aspx

    If that does not help solve the problem, you might have to post a simplified code sample demonstrating how to reproduce the issue.

    There's still some unresolved issues with the <asp:UpdatePanel> support within the library which might also be causing some problems with your sample, although based on the description I don't think they're related.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab



    Hi Geoffrey,

    Thanks for your reply, however that doesn't help me. The breaking changes just show what I figured out by myself.
    I also don't think is has something to do with the update panel known issues.

    I changed my opinion: :-)
    I DO think it can be related with UpdatePanel once I just tested again removing it and it seems to work. :-(

    Here it goes a simple sample:

    <%@ Page Language="C#" EnableEventValidation="false" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
    
    
        }
    
    
        protected void Button1_Click(object sender, EventArgs e)
        {
            this.lblMessage.Text = "Button1 Clicked at: " + DateTime.Now.ToLongTimeString();
        }
    
    
        protected void Button2_Click(object sender, EventArgs e)
        {
            this.lblMessage.Text = "Button2 Clicked at: " + DateTime.Now.ToLongTimeString();
        }
    
    
        protected void Button3_Click(object sender, EventArgs e)
        {
            this.lblMessage.Text = "Button3 Clicked at: " + DateTime.Now.ToLongTimeString();
        }
            
    </script>
    
    
    <!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>Coolite ActiveTab Test</title>
    </head>
    <body>
        <p>
            <a href="ActiveTabTest.aspx">Reload</a></p>
        <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" />
        <asp:ScriptManager ID="ScriptManager3" runat="server" />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">
            <ContentTemplate>
                <asp:Label ID="lblMessage" runat="server" />
                <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Height="300">
                    <Tabs>
                        <ext:Tab runat="server" Title="Tab 1">
                            <Content>
                                <br />
                                <asp:Button ID="Button1" runat="server" Text="Button1" &#111;nclick="Button1_Click" />
                            </Content>
                        </ext:Tab>
                        <ext:Tab runat="server" Title="Tab 2">
                            <Content>
                                <br />
                                <asp:Button ID="Button2" runat="server" Text="Button2" &#111;nclick="Button2_Click" />
                            </Content>
                        </ext:Tab>
                        <ext:Tab runat="server" Title="Tab 3">
                            <Content>
                                <br />
                                <asp:Button ID="Button3" runat="server" Text="Button3" &#111;nclick="Button3_Click" />
                            </Content>
                        </ext:Tab>
                    </Tabs>
                </ext:TabPanel>
            </ContentTemplate>
        </asp:UpdatePanel>
        </form>
    </body>
    </html>
    To test, just select tab 2 and click the button2. After the postback, select another tab and do the same clicking on the respective button. You will see that it reloads with the first tab selected as active (in this case tab2).

    Let me know if I am doing something wrong.

    Leo.
  4. #4

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab

    Anything to do with the UpdatePanel may or may not work right at the moment (as in... I am actually writting UpdatePanel support code right now). This particular TabChanged bug from your code sample is linked to a different fix we added a few days ago. The UpdatePanel support is being worked on and this functionality will be supported before the v0.6 public release.

    Your best bet right now may be to disable the UpdatePanel(s) by setting EnablePartialRendering to False on the <asp:ScriptManager> and waiting for the next UpdatePanel support code to drop into svn.

    Example

    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="False" />
    Or, replacing <asp:UpdatePanel> functionality with <AjaxEvents> may be another option.

    Geoffrey McGill
    Founder
  5. #5

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab



    Hi Geoffrey,


    I know that play on compatibility, specially talking about Microsoft Ajax must be very tough. I also can see that you guys are doing a great job by mantaining this Framework compatible with most of the present technologies, but with due respect, ask me to disable partial rendering is like to say you can not use UpdatePanel.
    And nowadays everybody speaks about Ajax, although I've been doing asynchronous calls since it was not even been supported by the browsers, but it was possible on IE using the XMLHttpRequest object.


    At the moment the system is running without any page flicking and it was an pre-requisite since we started it. I cannot turn to my manager and say: "Sorry, it will not work for the moment". Although I am willing to test any Ajax solution (AjaxEvents) as long it solves partial rendering in a simple manner as it is been done by Microsoft Ajax.


    Actually I'll be happy to replace in the system all UpdatePanels, because I really don't like the way Microsoft does Ajax. At the moment I have no idea what your AjaxEvents can do, but I willing to read any documentation and see any sample, doodle, sandbox to learn how to use it, as long as it is complete and functional. Where I can find it?


    I also would be happy to use Anthem.NET to do Ajax. Is it compatible?
    Have you guys thought about doing Ajax as Anthem.NET does?
    Of course it requires to rewrite all Web Controls (Button, Label, Grid), but it is something you guys are doing anyway.


    The idea of build Ajax as you are building as "Plug-in" (whatever it is called) instead of embed it on each control is also great. I think it is even better, but how can I work with the current controls I am using at the moment? How can I refresh the controls that are not supported for te momment? Do I have to manually change InnerHTML property? (Sorry I am confused).


    I believe the ideal would be using the current Javascript shipped by the ExtJs instead of using any other solution. I put all my expectations on you guys, because I really know that you are doing a great job so far. I just need to work with what I got at the moment while waiting the Coolite grows as a Toolkit solution.


    Finally, but not less important, I've updated the Coolite version to solve old problems and this problem was introduced by this new release. Apart for any breaking changes that was easy to fix, for the point of view of my manager or even our customers, it is something that just stop working with this upgrade.


    Hope you understand and sorry for beeing so critical.


    Best regards,
    Leo.
  6. #6

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab

    I think I'll sleep on this overnight before responding.

    Geoffrey McGill
    Founder
  7. #7

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab



    Hi Geoffrey,

    Any chance I use only AjaxEvents to replace the Ajax Assyncronous postbacks currently managed by Microsoft Ajax (UpdatePanel, etc)?

    I am trying to test the AjaxEvent in a simple scenario, using Button Click, but it always respond as failure (Status code:200 BADRESPONSE: Syntax error). I tried many revisions (471 - 530) with no luck. There is any special config on web.config?
    I can't understand why it doesn't work in my test project. I simple copy one sample, let say (Handlers.aspx) exactly as it is on Sandbox and it doesn't work. I am assuming that must be something out of the scope of the code, because I tested with many samples and it happens with the same code that it is currently working on Sandbox downloaded through SVN when copied to my project, but it doesn't happens while it is on Sandbox..

    Please, can you help me ?

    Leo.
  8. #8

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab

    ljcorreia (9/30/2008)


    Hi Geoffrey,

    Any chance I use only AjaxEvents to replace the Ajax Assyncronous postbacks currently managed by Microsoft Ajax (UpdatePanel, etc)?

    I am trying to test the AjaxEvent in a simple scenario, using Button Click, but it always respond as failure (Status code:200 BADRESPONSE: Syntax error). I tried many revisions (471 - 530) with no luck. There is any special config on web.config?
    I can't understand why it doesn't work in my test project. I simple copy one sample, let say (Handlers.aspx) exactly as it is on Sandbox and it doesn't work. I am assuming that must be something out of the scope of the code, because I tested with many samples and it happens with the same code that it is currently working on Sandbox downloaded through SVN when copied to my project, but it doesn't happens while it is on Sandbox..

    Please, can you help me ?

    Leo.
    Ok, I found the web.config setup module. Posted here.

    Now I am trying to figure out how to update/change asp web controls. As far I as understand the Coolite controls would be automatically refreshed after postback. My concern now is how to do the same with native server controls.
    I think I've seen many tests with div, but if you could point me to the right direction would be good.

    Thanks.
  9. #9

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab



    Hi Leo,

    Version 0.6 has been released and includes much better support for the <asp:UpdatePanel>. Please try this latest release within your project and let us know if you run into any issues.

    Later today we will be published more code samples demonstrating the use of the <AjaxEvents>. The Examples Explorer will be available at http://www.examples.ext.net/.

    Hope this helps.
    Geoffrey McGill
    Founder
  10. #10

    RE: [CLOSED] Breaking changes on TabPanel ActiveTab



    Hi Geoffrey,

    Thanks for responding.
    I'll do all tests with the newest release first thing tomorrow.

    I managed to test the AjaxEvents, GridPanel, Label, FieldSet with TextField. So far so good. Actually, excellent. Well done. I'll continue doing more tests to see how far I can go and replace these controls in my project.

    I'll let you know.

    Thanks for your help.
    Leo.
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Tabpanel and ActiveTab
    By reinout.mechant@imprss.be in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Aug 25, 2009, 3:55 PM
  2. TabPanel.ActiveTab question
    By ydnah2 in forum 1.x Help
    Replies: 2
    Last Post: Aug 04, 2009, 10:15 PM
  3. Get TabPanel ActiveTab inside Other TabPanel.
    By grmontero in forum 1.x Help
    Replies: 1
    Last Post: Jul 16, 2009, 11:45 AM
  4. TabPanel ActiveTab.ID error in AjaxMethod
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 08, 2008, 6:57 AM
  5. Problem with TabPanel Control ActiveTab
    By matmani in forum 1.x Help
    Replies: 2
    Last Post: Jun 09, 2008, 8:18 PM

Posting Permissions