[CLOSED] [1.0] Radio Check Listener issue

  1. #1

    [CLOSED] [1.0] Radio Check Listener issue



    When I click on the "On" radio button, to enable the panel, it works fine. However, when I click on the "Off" radio button (to disable it), the Check Listener isn't firing. See code below:

    <ext:Panel runat="server" Border="false" Title="" Layout="Row">
        <Items>
            <ext:Radio ID="rOff" runat="server" BoxLabel="Turn panel Off" GroupName="MyRadio" Checked="true">
                <Listeners>
                    <Check Handler="#{pPanel}.disable();" />
                </Listeners>
            </ext:Radio>
            <ext:Radio ID="rOn" runat="server" BoxLabel="Turn panel On" GroupName="MyRadio">
                    <Listeners>
                        <Check Handler="#{pPanel}.enable();" />
                    </Listeners>
            </ext:Radio>
            <ext:Panel ID="pPanel" runat="server" Icon="Layout" Title="My Panel" RowHeight="1" Disabled="true">
                <Items>
                    <ext:Label runat="server" Html="[B]This panel should disable/enable based on the settings above." />
                </Items>
            </ext:Panel>
        </Items>
    </ext:Panel>
  2. #2

    RE: [CLOSED] [1.0] Radio Check Listener issue

    Hi,

    It fires. Just it fires when the radio is unchecked also. Therefore second radio always reenable panel. Wrap the Radio's Check handler by if statement
    <Check Handler="if(checked){#{pPanel}.disable();}" />
    <Check Handler="if(checked){#{pPanel}.enable();}" />
  3. #3

    RE: [CLOSED] [1.0] Radio Check Listener issue

    This worked. However, I notice that when you use the GridPanel.disable() it adds a shaded layer over the GridPanel.

    When you just use Disabled="true" on the GridPanel, it doesn't add this shade.

    How do you keep it from adding the shade overlay when you disable() it?

  4. #4

    RE: [CLOSED] [1.0] Radio Check Listener issue

    Hi,

    It is IE bug. If panel is disabled then mask appears (you call it as shading). Just IE cannot display mask initialy. The note form EXtJS doc


    An important note when using the disabled config on panels is that IE will often fail to initialize the disabled mask element correectly if the panel's layout has not yet completed by the time the Panel is disabled during the render process. If you experience this issue, you may need to instead use the afterlayout event to initialize the disabled state:


    new Ext.Panel({
    ...
    listeners: {
    'afterlayout': {
    fn: function(p){
    p.disable();
    },
    single: true // important, as many layouts can occur
    }
    }


    If you check that example in the other browsers then you see that shading always appears
    If you developing under IE only then you can set MaskDisabled="false" for the panel


Similar Threads

  1. Replies: 2
    Last Post: Feb 29, 2012, 9:04 PM
  2. [CLOSED] Check Uncheck Radio using javascript
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 21, 2011, 10:45 AM
  3. [CLOSED] Radio Button Listener Check event problem
    By ogokgol in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 21, 2011, 2:46 PM
  4. radio button listener
    By bilgecooliteforum in forum 1.x Help
    Replies: 3
    Last Post: May 06, 2010, 12:30 AM
  5. [CLOSED] Radio/Check Group labels broken in IE8
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 11, 2009, 8:15 AM

Posting Permissions