The following table lists the user interface Blox and their JSP custom tags:
As discussed earlier in Alphablox applications and the underlying Blox, Blox can be standalone or nested as children within other parent Blox, depending on which Blox is being used and their particular usage. By default, a standalone Blox includes nested Blox set to their default values. A PresentBlox, for example, includes a nested ChartBlox, DataBlox, DataLayoutBlox, GridBlox, PageBlox, and ToolbarBlox.
The following table lists the nested Blox components for each standalone presentation Blox:
Rather than have to include nested tags for the nested Blox, you can just include just the top-level parent Blox tag (the nested Blox listed above are implicitly included).
A minimal PresentBlox, for example, defined with <blox:present> tag would look like this when coded with opening and closing tags:
<blox:present id="myPresentBlox"></blox:present>
or like this, when using the shorthand method:
<blox:present id="myPresentBlox"/>
The shorthand method is recommended most of the time — opening and closing tags are only required when content (called the body) needs to be added between the tags.
If you included all of the possible nested Blox tags that are implicit to the PresentBlox, this is what the same PresentBlox would look like:
<blox:present id="myPresentBlox"> <blox:grid/> <blox:chart/> <blox:toolbar/> <blox:page/> <blox:dataLayout/> <blox:data/> </blox:present>
Since the nested Blox are implicitly included, even when you do not explicitly add the nested Blox tag, include nested Blox tags only when you need to include required tag attributes or tag attributes for properties that you need to change from their default settings.
If you placed a PresentBlox tag on a page without any defined nested Blox or defined tag attributes, a PresentBlox would be rendered on the page, but the Blox would not do anything interesting — without defining a data source and query on the nested <blox:data> tag at least, no data would be retrieved. In order for Blox to do something useful, you usually need to add tag attributes or nested property tags.
At this point, you should understand how to get a Blox to appear on a JSP page and how to include nested Blox. The next section explains how to add simple tag properties to Blox.