PDA

View Full Version : [CLOSED] [#613] TreeView's LoadMask property set to false



RCN
Dec 17, 2014, 6:30 PM
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

http://forums.ext.net/attachment.php?attachmentid=17301&stc=1

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

http://forums.ext.net/attachment.php?attachmentid=17291&stc=1



<!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

RCN
Dec 17, 2014, 7:38 PM
As stated before, setting TreeView's LoadMask property has no effect.



<ext:TreeView LoadMask="false" />


During TreeView onRender, loadMask is set to true;

17311

RCN
Dec 17, 2014, 7:42 PM
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>

RCN
Dec 17, 2014, 8:00 PM
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>

Daniil
Dec 19, 2014, 3:46 PM
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.

RCN
Dec 19, 2014, 4:09 PM
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

RCN
Dec 27, 2014, 2:14 AM
I confirm that it has been fixed