You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Reumann <st...@reumann.net> on 2005/08/19 21:52:30 UTC

Shale/JSF examples?

I'm venturing more into the world of JSF again and I'm looking MyFaces 
examples and Shale examples. The only Shale stuff I found was the 
shale-usecases examples, yet I haven't found those examples handling any 
of the basic stuff the docs seem to mention. For example 
http://struts.apache.org/shale/features.html#view mentions if you 
implement the ViewController interface (which the examples do), you get 
a bunch of methods for free, yet I don't see examples of them being 
implemented anywhere? - init(), prepoces(), etc.

The reason I started my struttin with Struts site 
http://www.reumann.net/struts/main.do was to create examples of some 
simple applications that do the struts 'basics' first - ie simple 
examples of CRUD. Are there any simple examples of these for any JSF 
implementations? Yes, I looked over JSF Central and I wasn't too 
impressed with any sample apps available for download.

(Actually I did write a simple one using MyFaces but it needs to be 
fixed up before I'd recommend anyone really use it since it was my first 
stab at JSF and I'm sure I'm doing somethings that aren't best 
practices. If anyone wants it though just e-mail me offlist at rick at 
reumann dot net and I'll send it.)

-- 
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Shale/JSF examples?

Posted by Craig McClanahan <cr...@gmail.com>.
On 8/21/05, Rick Reumann <st...@reumann.net> wrote:
> Craig McClanahan wrote the following on 8/19/2005 7:19 PM:
> 
> > Doing complete CRUD examples with Shale are definitely on my list of
> > things I'd like to see/get done.
> 
> Sounds good. Maybe I can help and in the process learn along the way:)
> What's the best list to post to in regard to shale stuff? I didn't see a
> list linked from http://struts.apache.org/shale/ so not sure if I should
> post to a JSF list? This list?
> 

Shale is a Struts sub-project, so user-related questions are on topic
here, and development related topics (like adding examples) are
appropriate on the Struts developer list.  Prefixing your message
subjects with "[shale]" will help those who have message filters weed
out things they are not interested in.

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Shale/JSF examples?

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Rick,

I'd like to read your stuff here with subject's prefixed [Shale] or on the
MyFaces user discussion list since I'm learning JSF and Shale all by myself
and probably have some similar questions.

Regards,
David

-----Original Message-----
From: Rick Reumann [mailto:struttin@reumann.net]
Sent: Monday, August 22, 2005 1:09 AM
To: Struts Users Mailing List
Subject: Re: Shale/JSF examples?


Craig McClanahan wrote the following on 8/19/2005 7:19 PM:

> Doing complete CRUD examples with Shale are definitely on my list of
> things I'd like to see/get done.

Sounds good. Maybe I can help and in the process learn along the way:)
What's the best list to post to in regard to shale stuff? I didn't see a
list linked from http://struts.apache.org/shale/ so not sure if I should
post to a JSF list? This list?

--
Rick


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Shale/JSF examples?

Posted by Rick Reumann <st...@reumann.net>.
Craig McClanahan wrote the following on 8/19/2005 7:19 PM:

> Doing complete CRUD examples with Shale are definitely on my list of
> things I'd like to see/get done.   

Sounds good. Maybe I can help and in the process learn along the way:) 
What's the best list to post to in regard to shale stuff? I didn't see a 
list linked from http://struts.apache.org/shale/ so not sure if I should 
post to a JSF list? This list?

-- 
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Shale/JSF examples?

Posted by Craig McClanahan <cr...@gmail.com>.
The existing use cases are pretty simplistic and don't really need
much of the event services that ViewController provides.  Here's some
thoughts on where they are going to be the most relevant, in
descending order on how likely I think they are to be used.

* prerender() -- Go grab information out of the database that
  is *only* needed if you are going to render this page.  For example,
  you might need to do an expensive SQL query to grab the details
  for a table component rendered on this page, and you don't want to
  waste the time to execute this if you are going to navigate elsewhere.
  (The use cases for this are pretty similar to the use cases for the
  Controller interface in Tiles, so those kinds of examples should apply).

* destroy() -- Clean up an resources allocated in a previous lifecycle
  method.  For example, assume you used prerender() as described above,
  and you had to allocate a JDBC connection to do it.  You could put the code
  to return the connection to the pool in destroy(), so that the connection
  was available during rendering (critical if you have value bindings to
  column values returned by the query) but is properly cleaned up
after rendering.

* preprocess() -- If you need a resource, such as a database connection,
  in order to perform the submit processing (for example, if your
fields are bound
  to columns in a database, the ResultSet needs to be activated before you get
  to Update Model Values phase), allocate it here and clean up in destroy().

* init() -- If you have resources that are going to be needed for *either*
  processing a form submit *or* rendering the page, allocate them here and
  clean up in destroy().  One example might be a database connection (or
  Hibernate session) that you are going to need no matter what.

Doing complete CRUD examples with Shale are definitely on my list of
things I'd like to see/get done.  So is porting the Struts mailreader
example for interesting compare/contrast.

Craig



On 8/19/05, Rick Reumann <st...@reumann.net> wrote:
> I'm venturing more into the world of JSF again and I'm looking MyFaces
> examples and Shale examples. The only Shale stuff I found was the
> shale-usecases examples, yet I haven't found those examples handling any
> of the basic stuff the docs seem to mention. For example
> http://struts.apache.org/shale/features.html#view mentions if you
> implement the ViewController interface (which the examples do), you get
> a bunch of methods for free, yet I don't see examples of them being
> implemented anywhere? - init(), prepoces(), etc.
> 
> The reason I started my struttin with Struts site
> http://www.reumann.net/struts/main.do was to create examples of some
> simple applications that do the struts 'basics' first - ie simple
> examples of CRUD. Are there any simple examples of these for any JSF
> implementations? Yes, I looked over JSF Central and I wasn't too
> impressed with any sample apps available for download.
> 
> (Actually I did write a simple one using MyFaces but it needs to be
> fixed up before I'd recommend anyone really use it since it was my first
> stab at JSF and I'm sure I'm doing somethings that aren't best
> practices. If anyone wants it though just e-mail me offlist at rick at
> reumann dot net and I'll send it.)
> 
> --
> Rick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org