On Fri, 19 Sep 2003, Martin Naskovski wrote:

> Date: Fri, 19 Sep 2003 15:38:24 -0700
> From: Martin Naskovski <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>      Martin Naskovski <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: JSF and rich clients (non-HTML)
>
> Probably a lame question, but here it goes anyway since I haven't
> really looked into JSF - can JSF be used in a non-HTML specific way?
> E.g. use JSF to provide content for a JSwing (or similar) GUI? Is JSF
> this flexible or is it strictly confined to rendering certain output that
> can only be viewed inside a web browser?
>

You might want to download and play with it yourself :-).  It's packaged
in the Java Web Services Developer Pack, version 1.2:

  http://java.sun.com/webservices/

and there's a tutorial included.

JavaServer Faces does indeed support non-HTML output.  It separates the
concerns into a component (which has render-INdependent properties) and a
renderer that recognizes render-DEpendent attributes.  For example, the
generic component for user-invokable actions is called UICommand, with
properties like a reference to the server-side Action to be invoked if the
user activates this component.  The standard HTML renderkit includes two
renderers for UICommand:  "Button" and "Hyperlink" that each recognize the
set of attributes relevant for the corresponding HTML element.

Out of the box, there is a set of standard renderers for HTML that are
guaranteed to be portable to any implementation of JavaServer Faces,
because this is a very common use case.  But it's by no means the only
possibility.  At JavaOne, for example, I gave half of a session where we
built a renderkit that output SVG, so you could take advantage of all the
neat interactivity that SVG supports.  We used the same demo application
that comes with JavaServer Faces for HTM (CarDemo), and only had to switch
to the tag library for the SVG renderers and tweak a few attributes.  All
the back-end logic stayed the same.

In a similar way, you can interact with components at the Java API level
(they're basically glorified JavaBeans), or with JSP tags -- JSP is not
required, although it is supported out of the box for the standard HTML
renderers.

> Tnx.
>
> Martin
> --

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to