J2EE Palette UI Specification
Author: Libor Kotouc
$Revision: 1.7 $
$Date: 2005/09/16 12:18:28 $
Writing code (both Java and HTML/JSP) in NetBeans is currently a fairly low level task,
in the sense that users need to work with very low level building blocks, i.e. individual "words"
(Java class names, method names, JSP/HTML tag names, attribute names etc.).
Often the user would like to add whole snippets and patterns of code, both in order to enhance productivity,
and because many of these constructs are non-trivial to remember.
The component palette contains often used text pieces and this is way how to user can write jsp, html faster.
This document does not cover all details of the palette, only some specialities of HTML and JSP editors which
are those being supported in the promo-F release.
For more information see
Common Palette UI.
Main use cases are general for all palette clients,
see docs for
Common Palette UI.
There are no special use cases for HTML and JSP editors in promo-F.
The main general use case is the Insertion of the palette item itself. It can lead to a sequence of actions like
adding libraries to the project's classpath, generating some methods, reformatting of the document body etc.
The palette items allow user to customize their parameters and/or body during the insertion time.
The Customization can be considered as the use case extending the Insertion.
There is also the default behavior in case a user doesn't change the settings or supresses the customization at all.
The Insertion and the Customization use cases are described separatelly for each palette item, please follow the links
in the
Specification section.
The palette content is document-type specific, thus the set of the visible palette categories
is changing according to the focused document.
On the other hand, some of these categories are common for both editors.
There are following document mime-types supported for promo-F:
- text/html
- text/x-jsp (excluding JSP documents with XML syntax)
The list of all categories and their contents for HTML and JSP editors follows.
| Name | Description |
| Table |
<table border="1">
<thead>
<tr>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
|
| Ordered List |
<ol>
<li></li>
<li></li>
</ol>
|
| Unordered List |
<ul>
<li></li>
<li></li>
</ul>
|
| Image |
<img src="" />
|
| Link |
<a href=""></a>
|
| Meta data |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
| Name | Description |
| Form |
<form>
</form>
|
| Text Input |
<input type="text" name="" value="" />
|
| Multi-line Input |
<textarea name="" rows="4" cols="20">
</textarea>
|
| Drop-down List |
<select name="">
<option></option>
<option></option>
</table>
|
| Checkbox |
<input type="checkbox" name="" value="ON" />
|
| Radio button |
<input type="radio" name="" value="" />
|
| File Select |
<input type="file" name="" value="" />
|
| Button |
<input type="submit" value="" />
|
JSP editor categories contain all HTML categories by default.
| Name | Description |
| Use Bean |
<jsp:useBean id="" scope="page" class="" />
|
| Get Property |
<jsp:getProperty name="" property="" />
|
| Set Property |
<jsp:setProperty name="" property="" value="" />
|
| JSTL Choose |
<c:choose>
<c:when test="">
</c:when>
<c:otherwise>
</c:otherwise>
</table>
|
| JSTL If |
<c:if test="">
</c:if>
|
| JSTL For Each |
<c:forEach var="" items="">
</c:forEach>
|
| Name | Description |
| DB Query |
<sql:query var="">
SELECT column_name(s) FROM table_name
</sql:query>
|
| DB Query with Report |
Visual representation of the query output.
<sql:query var="result">
</sql:query>
<table>
<!-- column headers -->
<tr>
<c:forEach var="columnName" items="${result.columnNames}">
<th><c:out value="${columnName}"/></th>
</c:forEach>
</tr>
<!-- column data -->
<c:forEach var="row" items="${result.rowsByIndex}">
<tr>
<c:forEach var="column" items="${row}">
<td><c:out value="${column}"/></td>
</c:forEach>
</tr>
</c:forEach>
</table>
|
| DB Insert |
<sql:update>
INSERT INTO table_name (column1, column2,...)
VALUES (value1, value2,....)
</sql:update>
|
| DB Update |
<sql:update>
UPDATE table_name
SET column_name = new_value
WHERE column_name = some_value
</sql:update>
|
| DB Delete |
<sql:update>
DELETE FROM table_name
WHERE column_name = some_value
</sql:update>
|
The Enterprise items provide the same functionality as on Servlets.