WebLogic Workshop provides several built-in controls, most of which are designed to provide access to resources. You can add a new or existing built-in control to your web application.
Most of these controls are designed to generate a Java control extension (JCX) file when you add a new one to your application. The JCX file contains configuration information specific to that use of the control. You can reuse a generated JCX file in multiple applications. This kind of reuse assumes that the resources specified by the JCX file are present for each application in which it's used.
Note: Not all Java controls generate a JCX file. Controls that do not must always be added as new controls. An example of such a control is the Timer Control.
Common built-in controls that are installed with WebLogic Workshop include:
To Add a New Built-In Control To Your Application
When you don't have an existing JCX file for reuse, you can add a new control to your application.
Remember that for some but not all controls, when you add a built-in control to your application, you are actually creating a new control file. In the Insert Control dialog, you specify a name for the new control file that WebLogic Workshop creates. By default WebLogic Workshop adds this control file with a JCX extension to the same folder as the file that is currently open in Design View. This control file cannot be located in the root of the project. If the application is in the root of the project, you must create the built-in control in a different folder.
Note: In previous releases, JCX files were known as CTRL files. CTRL files are still supported.
To Create a Built-In Control in a Different Folder
When you add a new built-in control following the above procedure for controls that generate a JCX file, this JCX file will be placed in the folder containing the application. If you want to create a new built-in control and place it in a different folder, you can create the built-in control and then add this control to your application. To create a new built-in control:
Right-click the folder, then choose New-->Java Control.
In the New Java Control Extension dialog, select the control.
In the New Java Control Extension - Insert 'Control' dialog, provide a variable name for the control. This is the name you will use to refer to the control from your code. Also, provide values for the other fields. The exact fields depend on the type of built-in control you are adding.
To add an existing control to your design
You can add an existing JCX file for to your design. Note that in order to use an existing control, the control file must exist in your project:
An existing control is already configured for a particular purpose. Note that when you modify the properties of an existing control's JCX, that control is modified for every file in which it the JCX is used.
If the control you want is in a different project, you can copy the control file to your project to use it. Be aware that if you copy a control file to a new location, you are creating a new control. Any changes to the original control will not be reflected in the copy, and vice versa.
The SamplesApp application installed with WebLogic Workshop provides samples of the built-in Java controls. Look for these in the WebServices project.