Mobile Web development: pulrefreshplugin sencha 1.0 beta2 has a small bug

Source: Internet
Author: User

Background 1:

Sencha is a Web development framework for mobile devices. I personally recommend it. Combined with PhoneGap, it is easy to publish Native programs on various platforms, with good results.

The framework provides a MVC-based development mode with moderate functionality. The operation efficiency is also centered.

In terms of function, sencha> jo

Sencha> jquerymobile

Background 2:

The pull-down update pull refresh is a cool feature, especially on the mobile phone interface.

The effect after implementation is a bit like YIBO Weibo (a client that synchronizes four types of Weibo ). When pulling down, new data in the store is automatically obtained and displayed in the List.

Symptoms:

When the drop-down is performed, the current data is always cleared first, instead of appending new data.

Modification method:

In the/src/plugins/list/PullRefreshPlugin. js file:

OnBounceEnd: function (scroller, info ){....

...

This. list. getStore (). load () ;=> this. list. getStore (). load ({addRecords: true ,});

}

The red color is original. If it is changed to blue, the append mode can be changed.

If you need to customize parameters from outside, you can set it:

This. list. getStore (). load () ;=> this. list. getStore (). load ({addRecords: this. addRecords ,});

Postscript:

In order to find this modification point, I carefully checked some of the proxy and store code and learned a lot about the operating mechanism of the framework.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.