Re: component rendering model
Swing is a component-based framework. The distinction between objects
and components is a fairly subtle point: concisely, a component is a
well-behaved object with a known/specified characteristic pattern of
behaviour. Swing objects asynchronously fire events, have "bound"
properties, and respond to a well-known set of commands (specific to
the component.) Specifically, Swing components are Java Beans
components, compliant with the Java Beans Component Architecture
Excellent. JSF components have some of the same characteristics, except JSF
components aren't Java Beans. The key point is that components have some
smarts - they're not just simple emitters of text.
That definition is accurate enough in general, but falls slightly short in
specifics for a GUI framework like Swing or JSF. A GUI component is an object
that has intelligence about display matters. It can contain other components,
be contained by another, maintain certain local state such as display style,
and in the case of JSF, engage in various lifecycle behaviors including
passing data back and forth to backing beans.
The component tree (component that contains components that contain ...) is
maintained by the JSF framework independently of the request-response cycle
over HTTP. This allows the GUI parts of a JSF to behave in many ways like
corresponding Swing (or other desktop GUI) components. On top of that, they
live in a tag library that works for web applications. (As Arved noted, "JSF
only _typically_ renders HTML. But pretty much anything that you can jam into
a response stream can be rendered.")
Once you get used to JSF that component nature is a powerful tool. For me I
had to start thinking of JSF as like a normal GUI framework having web smarts
rather than as a web framework /per se/. That led me to structure web pages
as collections of components and helped me keep model and controller aspects
out of my screens.
For your original question, you don't need components to render a command
button. You can use HTML or XHTML. JSTL doesn't have buttons or tables -
it's just some convenience tags over functionality like branching or SQL
access. JSTL doesn't have components, as surely you can see from the definition.
Ceci n'est pas une pipe.