Component Overview
NavigationBar
A JavaScript vertical hierarchical navigation bar. Folders open and close on the client. Subfolders expand or collaps vertically, much like a tree or the Forrest navigation bars but completely free and easy to layout.
- The layout is 100% static HTML even for the folder and mouse-over highlighting
-
Add a static HTML row for each differently rendered item or its dynamic mode
(like mouse over, selection highlighting or folder open-close).
Note, that this offers perfect static page preview - At runtime on the client's browser, the component's JavaScript will take care of opening-closing folders, selection and mouse-over highlighting and the like
- The model (content, links, hierarchical structure, etc...) is defined via XML or API
- All standard Tapestry links are supported
- No themes, no hassles with JavaScript and no layout with predefined CSS names.
- You are completely free to design your bar with lists, paragraphs or (the default) tables
with any number of columns. Use any CSS, images or whatever structure you like
to design your items. In short, you can use all possible layout stuff of static HTML to
design your items.
Mouse-over rows may even have another internal structure as mouse-out rows (as long as the number of columns is the same) The component doesn't care about the inner structure of the items. It just replaces whole elements at mouse over/out or inserts/removes them on folder opening or closing. - Very good performance. There is a lot of caching behind the scenes.
DynamicImage
Put an <img> tag on your HTML template and give it a dynamical paint attribute
<img jwcid="@sotacs:DynamicImage" width="200" height="100" painter="painter:makeImage" />
Now just paint the image on your Java page or component with the makeImage method:
public void makeImage(Graphics2D g2d, IPainterContext context){ //do some funny Graphics2D stuff... //note that you have access here to all persistent //properties of the page/component g2d.setColor(Color.BLUE); g2d.fillOval(0,0,context.getWidth(), context.getHeight()); }
So far this is just the basic use.
There is much more with this component
- Advanced expiration based caching control both on server and client side
- Provides an API for the creation of image maps: You can add tooltips, JavaScript events and DirectLinks to map areas
- Produces JPEG or PNGs. (transparent PNG's are shown correctly in MSIE see TransparentPNG component)
- Note that you can use free libraries like JFreeChart,
JCaptchaBarCode4J,
jCharts or whatever API that draws on a Graphics2d instance
to produce the images
Look at the examples!
AjaxTextField
A Textfield that displays a selection pop up box triggered by AJAX requests.
- Very simple use but highly customizable
- The select box is rendered as html-table.
- Completely diffently rendered table rows can be mixed dynamically in the same box,
both selectable and merely informal.
'Dynamically' means that the server's AJAX request determines the structure of the select box table - You can specify client side JavaScript handlers
- Supports all properties of the normal Tapestry TextField including validators, delegate markers.etc..
TransparentPNG
When a .png image is included in an HTML with an <img>-tag,
MSIE up to version 6.0 does not support the alpha transparency.
This component uses a workaround, that makes all browsers including MSIE show correctly
the transparency
Include
Includes content from assets or classpath-ressources into the page. It covers basic functionality of a more sophisticated Include component, that up to now has not been ported to Tap4.0.