Mastering the Dojo Toolkit, part 5th: Dojo's UI component library

Source: Internet
Author: User
Tags html form dojo toolkit

Dijit Introduction

Starting with Dojo 0.9, dojo separates widgets from Dojo's core packages to form Dijit. Dojo adds a number of members to the widget family in Dijit, enhancing the widget's strength while also speeding up its load on the page.

To improve the Widget's appearance, Dijit offers several sets of style themes, such as the default-bound style theme Tundra, the style theme for improving page accessibility a11y, and the other two alternative themes Soria and Nihilo. And developers can also develop personalized themes based on the needs of their own projects. At the same time, Dijit has a high degree of support for internationalization and accessibility to people with disabilities. It can be said that Dijit has become one of the three carriages in the Dojo toolkit.

This article will describe in detail the use of widgets in Dijit. Because of the large number of Dojo widgets, can not be introduced. This is divided into three categories from the functional point of view: Form widget, Layout widget, Advanced widget. Select representative widgets in each category to be introduced with examples.

Use of the form Widget

In WEB applications with user concepts, registration is an essential feature, and registration is a bit of a dull task. There is an indisputable fact: no one likes to fill in the form-whether online or under the net. So it's not easy to design a valid page form. If you can't change the fact that the registration form exists, then you need to change the boredom of the form and make the form or the entire sign-up process easier and less effort. To achieve this goal, WEB developers design a longer registration form as a label, and use Javascript and regular expressions to give users some hints when they fill out the wrong information, design convenient date selection components, and more. But these efforts to improve user-friendliness tend to add a lot of work to developers, and it's not easy to make sure that the browser-independent nature of these components is not.

Is there a simpler way to develop WEB forms? Of course! Dijit provides WEB developers with a series of form Widgets that enable developers to easily design powerful, user-friendly forms widgets,web the form of a single developer.

Introduction to the form Widget

It can be said that each HTML form control can find its corresponding form widgets in Dijit. The following list lists the Form Widgets currently provided by Dijit:

form– a [form] control similar to HTML, while providing some useful methods and extension points;

button– HTML-like [button]-style controls, while adding some advanced features;

CheckBox

RadioButton

ToggleButton

combobox– a combination of the [select] combo box and the [Text] field control that is similar to HTML. You can provide a column of optional values like the Select combo box, while allowing the user to ignore these optional values, and enter whatever value you want to enter as you would in the [Text] field control;

filteringselect– an HTML-like [select] control, you can dynamically populate the options, and you can set the number of load options on demand;

textbox– HTML-like [text] control, while providing a series of cool features: You can cut the blank, change the case, set required, verify the input legality, date components, etc.

Validation

Currency

Date, Time

Integer

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.