Home > Java > javaTutorial > body text

Ext--detailed explanation of delayed loading examples

零下一度
Release: 2017-07-17 17:47:54
Original
1547 people have browsed it

Everyone should have encountered the following situations when using extjs under multi-threading:

Delayed loading of images is a commonly used technology in APP. The image will first generate a preview image, and wait until the original image After the download is complete, replace it.

When rendering several components at the same time, if the content of the component is dynamically read, sometimes the content of the subsequent components does not appear in the correct rendering order. For example, two forms are rendered at the same time. The fields of the form are obtained dynamically, and the result is form2. fields in The fields of form1 are overwritten. This situation is due to the fact that extjs is an asynchronous operation, and all loads are accessed at the same time. There are many ways to avoid this problem, here is one: extjs Lazy loading task

The following is the task code:

//创建延迟加载对象
var task = new Ext.util.DelayedTask(function(){
    //这里放置要延迟加载的代码段
    getActNameChanged();
    //alert("延迟加载");
});
//调用延迟加载对象的delay方法执行  参数为毫秒 本示例延迟0.1秒执行
task.delay(100);
Copy after login

The above is the detailed content of Ext--detailed explanation of delayed loading examples. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!