[FIXED] [V0.7] ActiveTabIndex always 0

  1. #1

    [FIXED] [V0.7] ActiveTabIndex always 0



    Hi
    I noticed that the ActiveTabIndex is always 0. Im calling a AjaxMethod that checks the TabIndex of a tabpanel in a viewport. And all of a sudden its 0 all the time. I dont have the time to create a example of this now. If you cant reproduce it ill take the time to do it.

    /Mikael
  2. #2

    RE: [FIXED] [V0.7] ActiveTabIndex always 0

    Hi Mikael,

    Please update from the SVN. I have fixed some bugs in AjaxMethods
    Plus please note that by default for AjaxMethod type of request is Load (which means that form will not submit). If you need form submit than need to add type=Submit in the config object

    [AjaxMethod]
            public int GetActiveTab()
            {
                return TabPanel1.ActiveTabIndex;
            }
    
    
    <ext:Button ID="Button1" runat="server" Text="Get Active Tab">
                                    <Listeners>
                                        <Click Handler="Coolite.AjaxMethods.GetActiveTab({type: 'submit', success: function(result){ Ext.Msg.alert('Active Tab', 'Index: '+result);}});" />
                                    </Listeners>
                                </ext:Button>

  3. #3

    RE: [FIXED] [V0.7] ActiveTabIndex always 0

    Hi Mikael,

    There is still a defect in the AjaxMethod. The default functionality of the AjaxMethod should be to submit the <form>, which would enable full access to all the ViewState values serverside. Somehow that functionality has changed. We're correcting the problem and will be committing an update soon.*


    You will not have to pass the type:"submit" property to the AjaxMethod config object.*


    Geoffrey McGill
    Founder
  4. #4

    RE: [FIXED] [V0.7] ActiveTabIndex always 0

    Hi Mikael,

    The default value for the AjaxMethod 'type' property has been changed to 'submit'. Now the ViewState for the controls will be updated during the AjaxMethod request.

    Example

    <script runat="server">
        [AjaxMethod]
        public void Update()
        {
            this.Label1.Text = "ActiveTab: " + this.TabPanel1.ActiveTabIndex.ToString();
            this.TabPanel1.ActiveTabIndex = 2;
        }
    </script>
    
    <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Height="300">
        <Tabs>
            <ext:Tab ID="Tab1" runat="server" Title="Tab 1" Html="Tab 1" />
            <ext:Tab ID="Tab2" runat="server" Title="Tab 2" Html="Tab 2" />
            <ext:Tab ID="Tab3" runat="server" Title="Tab 3" Html="Tab 3" />
        </Tabs>
        <Buttons>
            <ext:Button ID="Button2" runat="server" Text="Submit (AjaxMethod)">
                <Listeners>
                    <Click Handler="Coolite.AjaxMethods.Update();" />
                </Listeners>
            </ext:Button>
        </Buttons>
    </ext:TabPanel>
    
    <ext:Label ID="Label1" runat="server" />
    The new code has been committed to SVN and will be avilable with the public release of v0.7.

    Hope this helps.
    Geoffrey McGill
    Founder
  5. #5

    RE: [FIXED] [V0.7] ActiveTabIndex always 0

    thanks!
    its works great now!

Similar Threads

  1. ActiveTabIndex
    By Yannis in forum 1.x Help
    Replies: 2
    Last Post: Jan 19, 2011, 1:12 AM
  2. [CLOSED] How to FindOut ActiveTabIndex for MenuItems
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 11, 2010, 1:06 PM
  3. Set value to ActiveTabIndex.
    By flaviodamaia in forum 1.x Help
    Replies: 3
    Last Post: Mar 26, 2010, 2:45 PM
  4. [CLOSED] change Activetabindex
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 18, 2008, 9:08 AM
  5. [CLOSED] ActiveTabIndex
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 18, 2008, 6:08 AM

Posting Permissions