# Developing Advanced Controls

Java controls are a key part of the programming model for those writing web applications with WebLogic Workshop. Controls can be used to capture the bulk of an application's business logic, encapsulate access to resources with a simplified interface for developers, and so on.

This guide is intended for those building more sophisticated packaged controls. WebLogic Workshop provides rich run-time support and an API for building controls that support design-time features through IDE extensions, customization through JCX files, and asynchronous operation.

## A Bit of Terminology

The content in this guide assumes familiarity with the following control-related terms.

- Platform and custom controls

  Controls installed with the IDE are known as platform controls; additional controls built by application developers, independent software vendors, and others are known as custom controls.

- Local and packaged controls

  Simple custom controls may be written as local controls. A control is local when it is used as source in the same project as its container. This is a simple way for application developers to partition business logic. However, local controls provide limited access to the features available to controls.

  In contrast, a packaged control is built in the context of a control project. All controls that use the features described in this control developer's kit must be built as packaged controls.
- Regular and extensible controls

  A regular control does not generate a JCX file; an extensible control does. Because a JCX file is generated, an extensible control supports design-time customization. For example, an extensible control can support the user's changing the control's interface by adding, removing, and editing methods and callbacks. It can also be customized in a way that is not editable by the user; an example is the EJB control, whose interface is defined by the EJB it will be accessing.

  For more information on creating extensible controls, see Creating Extensible Controls.

- Control stubs and control deliverables

  A control deliverable is a JAR or ZIP file that contains all the files -- implementation, GIFs, annotation XML files, and so on -- required to use the control. A control stub is a JAR file that contains merely the information needed to make the control's availability visible to users, along with a URL from which the IDE may download the control the first time the user chooses to add it to an application. Together, these are known as available controls. This is a just-in-time approach to control delivery and use. For more information, see Packaging Controls for Installation.

## Content of this Guide

The material in this guide is intended for those building packaged custom controls that use the advanced features available for Java controls. This guide is intended to complement the material contained in the core WebLogic Workshop documentation (under "Working with Java Controls"). If you're looking for information about Java control concepts that's not covered here, it's likely you'll find it there.

In building an advanced Java control, the tasks you'll perform are likely to include:

- If you're building controls that will be distributed to multiple users, you should probably start with a control deliverable project. For more information, see Control Deliverable Projects.
- Set up debugging properties for your control project so that you can debug IDE extension components. For more information, see Setting Up for Debugging Advanced Controls.
- Develop your control's core logic in a JCS file. For more information, see the core WebLogic Workshop documentation.
- Set JCS file properties to configure features such as security roles, the name of your custom insert UI, the name of the group under which your control appears in menus, and so on. For more information, see the core WebLogic Workshop documentation.
- Handle life cycle callback events for efficient management of resource dependencies. For more information, see Handling Control Life Cycle Events.
- Define control properties in an annotations XML file, then connect the file to your JCS with the control-tags property. For more information, see Control Properties Overview.
- Build a class that validates your custom property attributes in both the Property Editor and in source code. For more information, see Creating Attribute Editors and Validators.
- Extend the IDE with a custom property editing dialog that validates the property values. For more information, see Creating Attribute Editors and Validators.
- Implement your control so that it is extensible, generating a JCX file when inserted. This enables design-time customization. For more information, see Creating Extensible Controls.
- Extend the IDE with a custom insert dialog designed to prompt users for properties specific to your control. For more information, see Creating Dialogs and Wizards for Inserting Controls.
- Write code to handle user actions (and your control's appearance) in Design View. For more information, see Controlling Appearance and Handling Actions in Design View.
- Package your control according to WebLogic Workshop specifications, making it easier for users to find and use the controls. For more information, see Packaging Controls for Installation.

Related Topics

None.