[CLOSED] [#613] TreeView's LoadMask property set to false

  1. #1

    [CLOSED] [#613] TreeView's LoadMask property set to false

    On version 3.x, setting TreeView's LoadMask property has no effect, the mask is shown no matter whether it's set to true or false.

    Going further, on version 3.x the mask is shown over TreePanel's title and columns header



    While on version 2.x the mask is shown only over the records.



    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <script type="text/javascript">
            var convertType = function (value) {
                return Ext.String.format("{0} - Formatted", value);
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:TreePanel ID="_trp" RootVisible="false" Title="Ext.Net" Height="700" Width="500"
            Margins="10" Border="false" runat="server">
            <Store>
                <ext:TreeStore ID="_str" runat="server">
                    <Proxy>
                        <ext:AjaxProxy Url="/Example/LoadTreeFakeChildren">
                            <ActionMethods Read="POST" />
                            <Reader>
                                <ext:JsonReader RootProperty="data" />
                            </Reader>
                        </ext:AjaxProxy>
                    </Proxy>
                    <Model>
                        <ext:Model ID="Model1" runat="server">
                            <Fields>
                                <ext:ModelField Name="Name" />
                                <ext:ModelField Name="Type">
                                    <Convert Handler="return convertType(value);" />
                                </ext:ModelField>
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:TreeStore>
            </Store>
            <Root>
                <ext:Node NodeID="0" Text="Root" />
            </Root>
            <ColumnModel>
                <Columns>
                    <ext:TreeColumn Text="Name" DataIndex="Name" Flex="2" runat="server" />
                    <ext:Column Text="Type" DataIndex="Type" Width="300" runat="server" />
                </Columns>
            </ColumnModel>
            <View>
                <ext:TreeView DeferEmptyText="false" LoadMask="false"  />
            </View>
        </ext:TreePanel>
    </body>
    </html>
    namespace SandBox.Controllers
    {
        public class ExampleController : System.Web.Mvc.Controller
        {
            public ActionResult Index()
            {
                return View();
            }
    
            public StoreResult LoadTreeFakeChildren()
            {
                System.Threading.Thread.Sleep(TimeSpan.FromSeconds(5));
    
                NodeCollection nodes = new NodeCollection(false);
    
                for (int index = 1; index < 6; index++)
                {
                    Node no = new Node();
                    no.NodeID = index.ToString() + DateTime.Now.Second;
                    no.CustomAttributes.Add(new ConfigItem { Name = "Name", Value = no.NodeID, Mode = ParameterMode.Value });
                    no.CustomAttributes.Add(new ConfigItem { Name = "Type", Value = (index % 2 == 0 ? Type.Male : Type.Female).ToString(), Mode = ParameterMode.Value });
                    nodes.Add(no);
                }
    
                return new StoreResult { Data = nodes.ToJson() };
            }
        }
    
        [Serializable]
        public enum Type
        {
            Male = 1,
            Female = 2
        }
    }


    Thanks in advance
    Attached Thumbnails tp001.png   tp002.png  
    Last edited by Daniil; Dec 21, 2014 at 2:16 PM. Reason: [CLOSED]
  2. #2
    As stated before, setting TreeView's LoadMask property has no effect.

    <ext:TreeView LoadMask="false"  />
    During TreeView onRender, loadMask is set to true;

    Click image for larger version. 

Name:	Tp003.png 
Views:	10 
Size:	15.3 KB 
ID:	17311
  3. #3
    It's possible to overcome the issue presented above by setting TreeView's loadMask to false on "BeforeRender", as shown below (Line 5) (Minified)

    <ext:TreePanel>
        <View>
            <ext:TreeView LoadMask="false">
                <Listeners>
                    <BeforeRender Handler="item.loadMask = false;" />
                </Listeners>
            </ext:TreeView>
        </View>
    </ext:TreePanel>
  4. #4
    Or force the value of loadMask, as shown below (Minified):

    <ext:TreePanel>
        <View>
            <ext:TreeView LoadMask="false">
                <CustomConfig>
                    <ext:ConfigItem Name="loadMask" Value="false" Mode="Raw" />
                </CustomConfig>
            </ext:TreeView>
        </View>
    </ext:TreePanel>
  5. #5
    Hi Raphael,

    Thank you for the report. Created an Issue.
    https://github.com/extnet/Ext.NET/issues/613

    Fixed in the revision #6225 (trunk).

    Added a breaking change item for 3.1.0 release:

    1. [EXTJS] The AbstractDataView's LoadMask property bool type has been changed to bool?. The TreeView's LoadMask property override has been removed.
    Regarding this.

    Going further, on version 3.x the mask is shown over TreePanel's title and columns header
    Confirm, there is such a change. I am not quite sure what to do with that.
  6. #6
    Thank you Daniil.

    Going further, on version 3.x the mask is shown over TreePanel's title and columns header
    Confirm, there is such a change. I am not quite sure what to do with that.
    I aggree with you. I just aimed to point out the change. it may be helpful to someone
  7. #7
    I confirm that it has been fixed

Similar Threads

  1. Replies: 2
    Last Post: Nov 08, 2013, 12:30 PM
  2. Replies: 1
    Last Post: Apr 26, 2013, 6:28 PM
  3. [CLOSED] GridPanel LoadMask property missed
    By Daly_AF in forum 2.x Premium Help
    Replies: 4
    Last Post: Oct 30, 2012, 8:24 AM
  4. Replies: 5
    Last Post: Jun 06, 2012, 4:33 PM
  5. Replies: 2
    Last Post: May 15, 2009, 10:21 AM

Posting Permissions