Use Dojo to develop custom business space Widgets, part 3rd

Source: Internet
Author: User
Tags json zip

Use Dojo to develop custom business space Widgets, part 3rd: Using multiple templates in IWidget and inheriting from basic widgets

Brief introduction

The custom widgets we developed for this series are based on the Dojo version that is included with the WebSphere V7.0 supported Business Space (hereinafter referred to as Business space), which has been tested in Mozilla Firefox 3.0.11. It's just that the common framework concept we develop can even be applied to applications that use Dojo, but not to Business space. Learning this series requires a basic knowledge of the DOJO and iWidget frameworks.

We will discuss topics that are frequently encountered in Dojo based applications. This series is divided into the following sections:

Part 1th: Generate DOJO markup using a generic markup handler

Part 2nd: Create a Dojo DataGrid component with paging functionality with a common grid handler

Part 3rd: Using multiple templates in IWidget and inheriting from basic widgets

Part 4: Use a common rest handler to emit a configurable rest call from IWidget

In the 3rd part, we'll show you how to use a basic widget to make your entire user interface look and feel alike. All iWidgets can use this basic template to keep the interface consistent, including the head, footer, and main content area.

In addition to this basic template, each iWidget uses a widget-specific template to display information about the part.

This article also shows you how all the IWidgets in an application inherits from a basic widget. Basic widgets prevent code rewriting by providing iWidgets common methods.

The following files are available for download in Part3samplecode.zip:

Base_iwidget.js: The base part that inherits from all widgets.

Base-widget-template.html: Basic widget template HTML file.

Basewidgettemplate.js: Basic Widget template Javascript file.

Resources_iwidgets.js:NLS property file.

Testwidget.xml: Widget XML file.

Testloader.js: Widget loading file.

Testwidget.js: Widget JavaScript class.

Test.html: A widget-specific HTML template.

Testmarkuphandler.json: A JSON file used to generate widget content.

STYLESHEET.CSS: Style sheet file for the interface.

We also provide a complete sample code for the work, Fullworkingcode.zip, for the entire series.

Related Article

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.