The
typically located in the upper right portion of the IDE, provides
components and code clips that you can use in the currently
selected page or code editor. You can open the Palette
by choosing Window > Palette.
The Palette opens automatically if you open a page in the Visual
Designer or if you create a new project, which opens a page.
There are two views, Code Clips and Components,
that are selected based on the editor you are using. Each view has a set of categories that contain elements, like code clips in the code clips view or components in the components view. You can right-click each category and choose to arrange its contents alphabetically.
The palette is sensitive to the version of J2EE that your projects use. In normal operation when you switch between projects based on different J2EE versions, the kind of change you might notice is that the components displayed for a J2EE 1.4 project are JavaServer Faces 1.1 components, and for a Java EE 5 project, they are JavaServer Faces 1.2 (Woodstock) components. However, if you customize the palette by adding new categories, new components, or new code clips, those changes apply only to projects with the same J2EE version as the currently active project. For example, if you add a code clip when a Java EE 5 project is active and then open a J2SE 1.4 project, you will not see the code clip in the palette.
The main content areas are:
Components. If you are working in the Visual Designer on a page,
this tab is selected, and you see the following categories:
(Woodstock) Basic. The components that you are likely to use most often, like buttons, tables, drop down lists, and text fields, to name only a few.
(Woodstock) Layout. Components whose main purpose is organizing the page, like the Grid Panel component that arranges components in a grid or the Group Panel component that groups components together.
(Woodstock) Composite. Components with a more complex organization and a specialized purpose, like the Calendar component that pops up a calendar and enables the user to select a date for an entry field, or the Breadcrumbs component that displays a list of hyperlinks to previous pages in a site hierarchy.
Validators. A set of data converters that you can use with components to convert between the String data type and other data types as needed.
Converters. A set of value checkers that you can use to validate user entered data.
Standard. The original set of standard
that shipped with the IDE. They do not have the sophistication or ease of use of the Basic, Layout, and Composite components. For example, the Standard components cannot participate in a theme, and their structure is often more complex to work with than the Basic components.
Advanced. A set of JavaServer Page markup tags
for advanced users.
Data Providers. A set of components that provide an interface to data sources like database tables and JavaBeans objects.
Advanced Data Providers. A set of data providers for use by advanced users only. These data providers are typically created for you and do not need to be added separately.
Code Clips. If you are working in an IDE code editor like the Java editor, the Code Clips view opens by default and displays
several categories of code clips (small pieces of useful code)
that you can add to the page bean, the JSP page, and other
code files associated with your page.
You can create your own code clips by selecting a category
heading in the Code Clips view and then selecting code in a source
code editor and dragging it to the Code Clips category you selected.
You can also select text in any editor, copy it to the system buffer, and then right-click in a Code Clips category and choose Paste as Clip to paste the selection as a new code clip.