Flex learning-Renderer and editing equipment

Source: Internet
Author: User

The role of the Renderer (itemreaderer) is to render the style of the data source item of the container and flexibly change the display form of its subitem.

 

You can create a Renderer in either of the following ways:

1> define itermrenderer directly: <itemrenderer id = "ir"> </itemrenderer>

<Mx: List itemrenderer = "ir"/>

2> Use classfactory: var IR: classfactory = new classfactory (itemrenderer );

<Mx: List itemrenderer = "ir"/>

The instantiated itemrenderer must be a class that implements the ifactory interface.

 

Each Renderer has a data attribute, that is, one of the container dataprovider. When the Renderer is instantiated, the value of the data source is passed to Data. In addition, the Renderer can access container objects only if idropinlistitemrenderer is implemented. The SDK has implemented the following interfaces: button and checkbox.

 

Renderer instantiation process:

1> when several renderers need to be displayed on the page, several renderers are instantiated.

2> If the itemrenderer implements the Renderer of the idropinlistitemrenderer interface, the interface has two methods: Get listdata and set listdata. The system will call the set listdata method to pass the parent window object to the itemrenderer at this time.

 

 

 

Use of the Editor:

1> set rendereriseditor to true. When you double-click it, it enters the editing status.

2> after editing is complete, the item_edit_end event is triggered, which is handled according to your own needs in this method.

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.