Design Palette View

Use the Design Palette to:

  1. Drag and drop tags and data objects onto a JSP page.
  2. Drag and drop web service design elements into a web service.

basic

How To Open This View

The Design Palette view appears in the J2EE, Page Flow and Resource perspectives.

The Design Palette is populated when JSP, HTML, WebLogic web service, and certain XML files are open; otherwise it is unpopulated.

How to Use this View

...To Add Tags to JSP and JSF Pages

When editing an HTML or JSP page, the Design Palette displays HTML and JSP tags available for drag and drop onto the page. You can also double-click or select and press Enter to insert a tag on a page.

Help for a specific tag is provided when you select a tag and press F1. Alternatively, right-click a tag and select Help.

When an HTML page is open only the HTML tags are displayed.

When a JSP page is open, the following tag libraries are displayed:

To add a tag library to the JSP page (and add that library's tags to the Design Palette), from the JSP section of the Design Palette, drag and drop Taglib Directive onto the JSP page. On the TagLib Directive Tag dialog, next to the URI field, click the lightbulb icon.

tag

The Choose Tag Library dialog contains a list of all available tag libraries, including those that reside in JARs on the classpath.

tags

...To Display Data in JSPs

The Data section of the Design Palette displays the JSP variables that are available to a JSP.

For example, assume that the following <netui-data:declarePageInput> tag appears on a JSP.

    <netui-data:declarePageInput name="getCustomersResult" type="model.Customer[]" />

The above tag will cause the Data section of the Design Palette to be populated with the getCustomersResult data object, as shown below.

data

The scope of the variables is indicated by the following icons:

req scope - scriptlet variable

session scope - page variable

script scope - application variable

app scope - session variable

page scope - request variable

To display only those JSP variables used on the active page, click the triangular icon dropdown at the top of the view (the view menu) and select Show used variables only.

sel

To highlight the variable reference in the JSP source view, click the view menu, select Synchronize variable selection, and then click a variable in the Design Palette.

nav

Handling unresolved external variables

Workshop automatically detect the variables available to be used in a JSP page. These variables could be declared in the JSP page itself, for example by using a jsp:useBean tag, or declared externally, for example by setting a request scope attribute in a Struts action java class that is executed before the page is displayed.

In some situations, the IDE cannot detect some of the external variables, and it reports warnings when they are used in the JSP pages. An example of this is when a variable is set in a Struts plug-in.

For example, if a lastLoginDate session variable is known to be accessible at runtime from a JSP page but is not detected, the IDE can suppress this error message by adding a JSP comment before the first usage of the external variable in the page:
<%-- <nitrox:var name="lastLoginDate" type="java.util.Date"/> --%>
This comment declaration will suppress the warnings related to the external variable usage and adds the variable to the Variables view.
Note that the type attribute in this JSP comment is optional.

To automatically suppress external variables through use of a suppression in the JSP page, go to the Design Palette view and click the pull down menu. Select New External Variable and add the appropriate information to the New External Variable dialog. The IDE will then add the variable to the Variables view and automatically add the suppression comment to the JSP source.

alt

For more details on using the Data section of the Design Palette, see Using the Design Palette: Data.

...To Design Web Services

When a WeLogic web service file is open, the Design Palette displays design elements available to the web service.

ws

To add a method, callback, or control reference to a web service, drag and drop an icon from the Design Elements section into the web service Design View.

The Referenced Controls section displays the methods available on any controls referenced by the web service. To add a method of a referenced control, drag and drop the method into the web service Design View.

For detailed instruction on using the Design Palette with web services see Using Design View to Create Web Services.

Filtering the Design Palette Display

By default the Design Palette display all available tag libraries and JSP variables and design elements. To filter the display to just the tag libraries or the JSP variables, use the dropdown at the top of the view.

filter

Related Topics

Using the Design Palette: Data

Using Design View to Create Web Services

Data Display Wizard

Data Grid Wizard

Create Form Wizard

Update Form Wizard

 


Still need help? Post a question on the Workshop newsgroup.