NetUI Tag Library Overview
NetUI Tag Library Overview
This topic provides an overview of the NetUI JSP tag libraries. NetUI provides three tag libraries, the core HTML tags, the data grid tags and a simple set of template tags.
|Tag Library URI||Prefix||Description|
|http://beehive.apache.org/netui/tags-html-1.0||netui||This is the primary tag library supporting HTML, including the form controls. It provides a number of features, used throughout the tag libraries, such as error reporting and base tags. In addition, it contains the Tree support.|
|http://beehive.apache.org/netui/tags-databinding-1.0||netui-data||This tag library provides binding to relational data, providing the Data Grid. The feature spans uses from simple tables, to sortable, filterable, pageable and updateable grids.|
|http://beehive.apache.org/netui/tags-template-1.0||netui-template||This tag library provides a very simple templating facility, allowing common elements such as headers, footers, etc.|
The prefix is the prefix used within the documentation set and obviously can be changed.
In a typical JSP, the following lines would be used to include each of the NetUI tag libraries:
<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%> <%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
The NetUI tags support binding values from implicit object to attributes through the JSP 2.0 Expression Language (EL). This support is for read-only data. In addition, many tags support read-write access to implicit objects. This support is almost always done through the dataSource attribute on the tags. In addition, there are a number of binding contexts introduced to allow binding to page flows and other NetUI implicit objects. For more information on data binding see the Data binding to NetUI Implicit Objects topic.
Runtime Error Reporting
The tag libraries report runtime errors in a common way. In the page fragment below, a set of anchors have invalid attribute values. There is an error reported where the tag would normally have rendered HTML. In addition, there is a table rendered at the end of the document that contains the details of the errors. In many cases, runtime errors in the tags result in the tag reporting an error and rendering continues on. This means that multiple errors will be reported. In addition, many tags will report multiple errors. Typically, errors wouldn't occur in production because they would be fixed during development. The error reporting is intended to make developing new pages easier by making errors obvious.
Runtime Errors Reported in a Rendered Page
Core HTML Tags
The core HTML tag library provides the core HTML elements. These include both the HTML structure and the HTML form controls. In addition, the tags provide a number of core features that are used by all of the NetUI tag libraries.
The HTML tags have a simple and expected mapping to the HTML elements that they generate. See the HTML to NetUI Tag Mapping for details. In addition, the HTML controls, called form controls in this document, have additional details in the NetUI Form Control Tags topic.
The HTML tags can support multiple versions of the HTML specifications, including HTML 4.01 and XHTML 1.0 Transitional. The default format is specified for a WebApp and may be overridden for an individual document. For more information see the HTLM and XHTML Support topic.
Finally, the core tags provides a set of tags and classes that can be used to build complex tree representations. See the Tree Tags topic for information on creating trees.
The NetUI data tag library provides tags that render complex, high-level HTML markup in a page or that support data binding in JSPs. The library supports a range of features from simple tables rendered with the repeater to complex data grids rendered with the data grid tag set. The data grid includes support for sortable columns, filtering, paging and updatable grids. Styles can be applied to the grids to customize their presentation. For more information on the data grid see Beehive NetUI Data Grids. For more information on the repeater tags, see Repeating JSP Tags.
The template tags represent a very simple templating system. The tags allow for a very simple template page to be created. Content pages then include their template to form the resulting rendered page. The content pages are written as sections of content that are inserted into defined points inside the template. For more information on the template tags see the NetUI Template Tags topic.