[CLOSED] Disabled Style applied incorrectly

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Disabled Style applied incorrectly

    Hi,

    I created a test case with the error that I reproduce in my MVC project.
    When you have it loaded, press buttons 3 and 4 or 4 and 3 to enable tabpanel and formpanel and you'll see controls are enable (you can write and click it) but css style looks like if the control is disabled.

    SAMPLE PAGE
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Panel runat="server" Layout="HBoxLayout">
            <Items>
                <ext:Button runat="server" Text="1-Disable Form">
                    <Listeners>
                        <Click Handler="myForm.setDisabled(true);" />
                    </Listeners>
                </ext:Button>
                <ext:Button runat="server" Text="2-Disable Tab">
                    <Listeners>
                        <Click Handler="myTab.setDisabled(true);" />
                    </Listeners>
                </ext:Button>
                <ext:Button runat="server" Text="3-Enable Form">
                    <Listeners>
                        <Click Handler="myForm.setDisabled(false);" />
                    </Listeners>
                </ext:Button>
                <ext:Button runat="server" Text="4-Enable Tab">
                    <Listeners>
                        <Click Handler="myTab.setDisabled(false);" />
                    </Listeners>
                </ext:Button>    
            </Items>
        </ext:Panel>
        <ext:FormPanel ID="myForm" runat="server">
            <Items>
                <ext:TabPanel ID="myTab" runat="server">
                    <Items>
                        <ext:Panel ID="MyPanel" runat="server" Layout="FitLayout" Title="Panel with partial view" Height="500">
                            <Loader runat="server" Url="/Area/Sample/MyPartialView" Mode="Script" TriggerEvent="activate">
                                <LoadMask ShowMask="true" Msg="Custom loading message..." UseMsg="true" />
                                <Params>
                                    <ext:Parameter Name="containerId" Value="#{MyPanel}" Mode="Value" />
                                    <ext:Parameter Name="dummy" Value="(new Date()).getTime()" Mode="Raw" />
                                </Params>
                            </Loader>
                            <Listeners>
                                <BeforeRender Handler="myForm.setDisabled(true);myTab.setDisabled(true);" />
                            </Listeners>
                        </ext:Panel>
                        <ext:Panel ID="MyPanel2" runat="server" Layout="FitLayout" Title="Panel with partial view 2" Height="500">
                            <Loader runat="server" Url="/Area/Sample/MyPartialView" Mode="Script" TriggerEvent="activate">
                                <LoadMask ShowMask="true" Msg="Custom loading message..." UseMsg="true" />
                                <Params>
                                    <ext:Parameter Name="containerId" Value="#{MyPanel2}" Mode="Value" />
                                    <ext:Parameter Name="dummy" Value="(new Date()).getTime()" Mode="Raw" />
                                </Params>
                            </Loader>
                        </ext:Panel>
                    </Items>                
                </ext:TabPanel>
            </Items>
        </ext:FormPanel>
    
        </form>
    </body>
    </html>
    PARTIAL VIEW CONTENT
    <ext:Panel runat="server">
        <Items>
            <ext:TextField runat="server" />
            <ext:ComboBox runat="server">
                <Items>
                    <ext:ListItem Text="Item" Value="1" />
                </Items>
            </ext:ComboBox>
        </Items>
    </ext:Panel>
    CONTROLLER TO LOAD PARTIAL VIEW
    public ActionResult MyPartialView(string containerId)
            {
                Ext.Net.MVC.PartialViewResult r = new Ext.Net.MVC.PartialViewResult(containerId, Ext.Net.RenderMode.AddTo);
                r.SingleControl = true;
                r.WrapByScriptTag = false;
                return r;
            }
    Last edited by Daniil; Sep 21, 2012 at 10:54 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please set the Disabled property to true instead of
    <BeforeRender Handler="myForm.setDisabled(true); myTab.setDisabled(true);" />
    Or use the Render event instead of BeforeRender.

    Though, I think you scenario should work. Probably, something is going wrong within the setDisabled function or somewhere. Here is a bug report for Sencha.
    http://www.sencha.com/forum/showthread.php?239769
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Please set the Disabled property to true instead of
    <BeforeRender Handler="myForm.setDisabled(true); myTab.setDisabled(true);" />
    Or use the Render event instead of BeforeRender.

    Though, I think you scenario should work. Probably, something is going wrong within the setDisabled function or somewhere. Here is a bug report for Sencha.
    http://www.sencha.com/forum/showthread.php?239769
    Well, I know this option but is it not possible in my scenario, I reproduced a test case only for you to test it.

    Thanks
  4. #4
    Thank you.

    Please clarify can you use a Render listener instead of the BeforeRender one for now?
  5. #5
    Well like I see you in previous post this is only an example to reproduce.

    In my project I use an Ext.onReady with formPanel.setDisabled(true) inside of it.
    I'll wait for fix in Ext.JS because I'm migration all application to Ext.NET 2.1 and work on it (with only visual issue) is waste time in something that will be corrected.

    If you need to close thread, do it.
  6. #6
    Quote Originally Posted by softmachine2011 View Post
    In my project I use an Ext.onReady with formPanel.setDisabled(true) inside of it.
    Ok, thanks for clarification. Then I can suggest this solution for now.
    <ext:Button runat="server" Text="3-Enable Form">
        <Listeners>
            <Click Handler="myForm.setDisabled(false);
                            myForm.body.removeCls('x-item-disabled');" />
        </Listeners>
    </ext:Button>
    <ext:Button runat="server" Text="4-Enable Tab">
        <Listeners>
            <Click Handler="myTab.setDisabled(false);
                            myTab.body.removeCls('x-item-disabled');" />
        </Listeners>
    </ext:Button>
    Quote Originally Posted by softmachine2011 View Post
    If you need to close thread, do it.
    No, thanks. We leave it unclosed till it will be fixed by Sencha and incorporated to Ext.NET.

    By the way, Sencha already opened a bug ticket.
  7. #7
    Ok thanks I'll try it but I await for Ext.JS fix
  8. #8
    Hi, I saw that bug ticket was fixed in 4.1.3 but now we are in 4.1.1 as I know.

    Do you know where I can find a roadmap of extjs versions?
  9. #9
    Quote Originally Posted by softmachine2011 View Post
    Do you know where I can find a roadmap of extjs versions?
    Recently, I tried to find it without success. Also some ExtJS team member told a few days ago there is no date for 4.1.2 yet.
    Last edited by Daniil; Aug 29, 2012 at 10:23 AM.
  10. #10
    Ok thanks.
Page 1 of 2 12 LastLast

Similar Threads

  1. [OPEN] [#93] NumericAxis labels rendered incorrectly
    By Stijn in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 27, 2012, 5:44 AM
  2. Replies: 5
    Last Post: Dec 12, 2011, 7:29 AM
  3. Icon displayed/rendered incorrectly
    By sky73rx3 in forum 1.x Help
    Replies: 1
    Last Post: Sep 10, 2011, 6:52 AM
  4. TabPanel CSS not being applied
    By red4life in forum 1.x Help
    Replies: 2
    Last Post: Oct 13, 2009, 3:35 PM
  5. TabPanel showing incorrectly
    By Argons in forum 1.x Help
    Replies: 4
    Last Post: Aug 12, 2009, 10:43 AM

Tags for this Thread

Posting Permissions