You can easily package your controls for delivery to users. This topic describes how to do so, and includes the following sections:
WebLogic Workshop supports the idea of available controls. An available control is one that is visible to the user, but whose implementation may not yet be installed or even present on the user's computer. From the users standpoint, a control is available when its name appears on the WebLogic Workshop Insert menu. An available control can take one of two forms on the user's computer:
Through the features described in this topic, WebLogic Workshop installs control deliverables as described here.
A control stub JAR file contains a jc-stub.xml file that describes the control and provides a URL from which the implementation can be downloaded. It should also contain GIF files that will appear with the control's name in IDE menus.
The following is an example of a jc-stub.xml file.
<stub xmlns="urn:workshop-control/external-stub.xsd"> <downloadURL>http://www.mycompany.com/controls/MyControl.zip</downloadURL> <control> <display-in-palette>true</display-in-palette> <label>My Control</label> <icon-16>myControl16.gif</icon-16> <icon-32>myControl32.gif</icon-32> <version>1.0</version> <palette-priority>3</palette-priority> <group-name>My Company's Controls</group-name> <group-priority>100</group-priority> <interface-class>MyControl</interface-class> <implementation-class>MyControlImpl</implementation-class> <description>Makes every application run faster and more reliably.</description> </control> </stub>
The <downloadURL> element must be a valid URL that points to a ZIP file. Other elements have the same meanings as their counterparts in the jc-jar annotation for JCS files.
For the schema on which this XML is based, see ExternalControlStub.xsd.
When you are ready to package your control project for testing or delivery, you can make a control deliverable. Remember that a control deliverable is a ZIP file that contains all of the files needed for your control, including its implementation files.
Note: Developing your controls in a control deliverable project greatly simplifies the task of delivering a control that includes documentation and/or samples. For more information, see Control Deliverable Projects.
To make a deliverable, right-click the project folder, then click Build Control Deliverable. WebLogic Workshop will package all the required files into a ZIP file and put the ZIP in the folder that contains your application (the one with the application's WORK file). Note that the ZIP file won't be visible from within the WebLogic Workshop Application view — you'll need to browse the file system to get it. You can also specify the location where WebLogic Workshop should place the control deliverable; you can do this in the control project's properties.
To test the deliverable, you can add it to a folder that's specified as a control library location (see User-Specified Control Library Locations), then add the control to an application.
Users can specify multiple locations at which the IDE should look for controls. They do this through the IDE Properties dialog (shown here) by adding external control library paths. User can add paths to ZIP files, JAR files, or merely paths to folders. Control stubs or deliverables
A described previously in this topic and in the core WebLogic Workshop documentation, you can configure how and where your controls appear in WebLogic Workshop's Insert menu. You do this by setting group-name and group-priority values. For control deliverables, you can set these values as attributes of your control's JCS file. For control stubs, you set these values in the jc-stub.xml file.
group-priority
Optional. A number indicating where in the Insert menu the group named in the group-name attribute should appear. Higher numbers (relative to other groups) place the group higher in the menu. Default is 0.
group-name
Optional. The name of the submenu under which this control should appear. If the group-name atribute value ends with the string "Menu" (such as "MyGroupMenu"), then the groupname, stripped of the word Menu, always becomes a submenu name, and all controls sharing that group appear on the submenu. If the group name does not end in the word Menu, then controls in that group appear as top-level items in the Insert Controls menu, unless there are more than five controls in that group. In that case, the group name becomes the top level menu name and all controls in that group appear as sub-menu items.
The following table lists the various sources from which the IDE integrates controls, along with their group-name and group-priority values.
Control Source | group-priority Value | group-name Value | Label |
---|---|---|---|
Workshop built-in controls |
-900 | Workshop | Database, EJB, JMS, Timer, Web Service |
Built-in integration controls |
-600 | IntegrationMenu | BEA supplied |
Built-in portal controls |
-300 | PortalMenu | BEA supplied |
Control projects in an application |
default 0 | <ProjectName> | User specified |
Application’s Libraries folder |
default 0 | <ApplicationName> | User specified |
User controls in current project |
default 0 | Local Controls | User specified |
External libraries |
Recommended: 100 | Specified by control author | Specified by ctrl author in jc-jar.xml |
For more information about JCS attributes, see the @jcs:jc-jar Annotation topic in the core WebLogic Workshop documentation. You can reach this topic quickly by selecting the attribute in the IDE, the pressing F1.
None.