An (almost) comprehensive list of Web Components
In talking with Andy Schwartz before our recent talk together at Oracle Open World, Andy mentioned that he'd like to see some new components make it in to JSF 2.1.
I'd like to see that too - but what new components? To aid the discussion, I thought it might be handy to make up a list of components that I think would be handy for JSF - but please, don't take this as an endorsement of any particular component for inclusion into the spec. At best, I can see us adding only a handful, perhaps 3 or so. Still, once started, this kind of project becomes it's own end - so I decided it might be good to publish such a list. Many of these components already exist in some form or another for JSF, or as a JavaScript Widget that could be wrapped in a JSF component - so most of them are available today.
Basic Html
Most of the basic HTML components are already well covered, but there would seem to be a little room for a few very basic components
- File Upload
- Formatted i18n data
- Date entry/display
- Time entry/display
- Currency entry/display
- Flat Tree
- Static Progress Status
- SingleRowSelect
- HTML5
This is pretty basic - and Servlet 3.0 just added it.
These can currently be done with converters and validators, but is there a better way?
A very basic hierarchical data visualization component that has no JavaScript required.
A bar which indicates percent complete, a static version of the Ajax version below
A radio button that works with a table.
There's new stuff coming up - should we start to care? IE is, as usual, the lone holdout.
Navigation
Components for navigating from one page to another.
- Breadcrumb Trail
- Navigation List
- Navigation Tree
Almost standard on many sites now, a horizontal list, often limited to three deep, that allows you to backtrack through your history without the back button.
A fairly straightforward list of links that navigate to different pages in the site. Often put in a Navbar on the left of the page.
Like a Navigation List, but with hierarchical categories
Security
Components that deal with identity and authorization.
- Java EE Login
- Logout
- Register
- Forgotten Password/Username
- Capcha
This one would seem to be a no brainer, but it's actually a bit hard to get right.
If you log in, you should be able to log out.
Probably not possible in a fully reusable way, since Java EE doesn't specify a standard registration API.
Same problem as Register
This would be very useful, but probably not amenable to standardization, since the robots keep getting smarter.
Simple Rich UI
- Framebuster
- Tabbed Pane
- Spinner
- Slider
- Calendar
- TimeSpinner
- ColorPicker
- ModalWindow
- ModalDialog
- Popup Menu
- FloatingWindow
- Tag Cloud
- TabularData
- Menubar
- CommandBar (icon button)
The war between the framers and the framebusters means that this will be obsolete almost immedately on release, but it might be worthwhile to try.
Basic Web component or rich component, depending on whether you use DHTML. Since DHTML is probably easier for the end user, it's my preference to have it in this list.
Increment an integer value by a set amount at the press of a button, or manually enter a number. Implemented as a demo in Mojarra 2.0.
Analog slider to choose a numeric value, or manually enter a value.
Need to also include options to pick a date, or only a month, or even only pick a year. May be hard to do reusably, since styling matters so much. Wrapped a YUI Calendar widget as a component as a demo in Mojarra 2.0.
A special case of a spinner, for picking a time.
A very special case, but easy to implement.
Alert box.
Alert box, with two or more buttons.
A detached embedded window, that you can move around within the HTML frame or window that contains it. After a brief burst of popularity, I've seen usage drop off.
I'm frankly not convinced of the usefulness of this particular visualization, but many designers seem to love it.
A table that's modeled on a database set, rather than being explicitly bound to the HTML table. Would include sorting, at a minimum, and also probably reorder of rows. Maybe even filtering?
Drop down menu bar. Many HI people hate them on the web.
Essentially, a horizontal strip of buttons.
Filthy Rich UI
Really elaborate graphical components. Harder to do as a standard, since styling becomes so important.
- Carosel
- Accordian
- EditText (in place edit)
- Shuttle (Switch List)
- ComboBox
- Collapsible Tree
- RichTextEdit
- RSSReader
- Slideshow
- Lightbox
- Charting
Like Apple's cover flow, flip through a set of images to select one.
Just because I've never seen it implemented well doesn't mean it's useless.
Easy to do, but hard to get right, I've implemented it as a demo in Mojarra 2.0.
Fairly common, I've implemented it as a demo in Mojarra 2.0.
Essentially a static version of the AutoSuggest component, below.
Tomahawk has had a tree for years.
Several good JavaScript widgets exist for this functionality.
Update a page automaticially with the latest blog posts. Far more useful than you might first think, since many programs (like hudson, for instance) now export data as RSS.
A fairly complex JavaScript widget.
An incredibly complex JavaScript widget for organizing images.
Incredibly complex, and incredibly useful, this is probably best done as a completely separate software product. Some JavaScript widgets already exist, and some JSF components already support this...
Behaviors
Things that are probably best implemented as behaviors.
- Tooltip
- DragAndDrop
- Clientside Validation
Probably almost trival to implement.
The opposite of trivial to implement, it could still be incredibly useful. Some support in various JSF component sets already.
A customer request since year 2000.
Ajax
- AutoSuggest
- Poll
- Map
- Progress Indicator
- Busy Status Indicator
The "shopping cart" of the Ajax world. Note that Andy is working on a demo that implements this as a behavior. Supported as a component in some JSF component sets.
Besides periodic updates, also handy for keeping sessions alive, and avoiding many cases of view expiration. Less necessary if we implement Comet, but probably still useful as simpler solution.
Relying on an external service means that this is probably not suitable for standardization.
Progress of a server operation
Essentially a binary version of Progress Status
More?
I'm sure I've left some out - suggest more in the comments...
- Login or register to post comments
- Printer-friendly version
- driscoll's blog
- 3775 reads






Comments
So, after almost a year, what
by ethermion - 2010-09-23 06:57
So, after almost a year, what was decided? Such that it matters, I would have chosen: 1) Login/Logout. JSF is part of Java EE, and any enterprise app needs a login. Lots of examples out on the web, all of them crummy. 2) Ajax busy - why not. 3) Tooltips - why not 4) File upload - part of the Java EE spec, so tie it together. As for the rest, 3rd party libraries do a nice job. Nice job on 2.0. A huge improvement over 1.2.More of them...
by mmarinschek - 2009-10-14 14:01
More features that a full-blown component library should have, and which might make sense for a JSF 2.1 version. I'll categorize in essentials and nice to have:Essential:
- singleRowSelect (radio-button in a table, small thing, but essential)
- subform
- sorting on the table
- some more layouting support (at least colspan/rowspan support )
Nice to have:- reorder, filter columns on a table
- tree-table
- layouting support: a sophisticated layout manager
- something to remember the current focus of elements on postback, and the scroll-state (should this be handled in a component?)
- multi component validator (component?)
- range-field (from/to)
- progress bar
- wait page (component?)
regards,Martin
Check out for example
by dnamiot - 2009-10-18 02:05
Check out for example Coldtags suite at http://servletsuite.com/jsp1.htm But the real competitors here are JavaScript widgets (e.g. from JQuery).Dojo and YUI are better examples, I think
by driscoll - 2009-10-19 09:55
jQuery has a lot of good functionality, but almost no widgets to speak of - they've got what, 6? Dojo and YUI, on the other hand, have dozens.
jQuery is better thought of as a DOM DSL, rather than a widget set - their widgets have always seemed more of an afterthought.
I've already examined Dojo and YUI in putting together the list above.
Good suggestions, some comments
by driscoll - 2009-10-14 14:31
I've added the progress bar - that was obvious, and it being left out was a transcription error when I copied from my notes. I also added a busy status indicator.
The ordering of rows on a table would be part of some new table that we'd implement - I'll have to update the TabluarData comment to reflect that. Same with reorder of columns, and perhaps filtering, though that sounds like that may be a bit much for standardized table.
SingleRowSelect seems limited but useful - I think it goes under Basic HTML, right?
Multicomponent validation doesn't really seem to be a component level feature, nor does layout managment - but I'd love to hear how you think they'd work.
I'd like to see focus be part of the view component - I had a request for that in 2.0 that got turned down. Having it be a component is problematic - there can only be one focus per page.
Can't you already do tree tables with facets?
Can't we get subform functionality with f:ajax? Maybe I need to add a separate validation section, but that really seems out of scope for what I was trying to do :-)