• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JSF best practice for non-forms

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi-
I'm tasked with designing a new website, and I'm considering using JSF. The site is basically 1 key form, and a mixture of static content pages and content pages that are dynamic based on the context that is set in that key form.
What I don't understand is, are you supposed to uses the faces servlet as the front controller for your entire application? or only the forms part of it?
It seems like the navigation/plumbing can be unnecessarily complex between non-form pages within faces.

Thanks!
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems like the navigation/plumbing can be unnecessarily complex between non-form pages within faces.

It's overly complex with forms. ;) If you think you need a framework then you might consider something simpler. Either roll your own front controller which is quite easy or go with something like Stripes.
 
Saloon Keeper
Posts: 28469
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only use JSF where you need JSF. It's not a world-dominating monolith that has to have everything its own way. You can mix ordinary servlets, Struts, and whatever other j2ee-compliant techniques you want in with JSF and JSF won't mind.
 
Dudley Dawson
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
It seems like the navigation/plumbing can be unnecessarily complex between non-form pages within faces.

It's overly complex with forms. ;) If you think you need a framework then you might consider something simpler. Either roll your own front controller which is quite easy or go with something like Stripes.



hmmm... I'll take a look at that.

I need a templating framework - considering tiles or possibly facelets.
I could definitely use my own front controller outside of the forms for flow control.
But I need somehting to handle forms. What I like about faces is the automatic bean population on submit, auto-redisplay on error, etc.
I have a multi-step form that is entirely dynamic. That is, the number of inputs on each page, and their range of valid values is entirely dependent on the user's current context. Anyone know of any other frameworks that make this easy?
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may consider looking at JBOSS Seam as well. Although, that may be overly complex if you are not using more than one input form. Seam natually integrates with Facelets and JSF...and it handles the managed beans transparently through the usage of annotations!

Otherwise if you are looking for something more simple, Struts may be more efficient for you. If you are using generally static pages, you may also consider just straight JSP...you can break up static page pieces into separate pages and just use the jsp:include where needed.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need a templating framework - considering tiles or possibly facelets.

Stripes has it's own template framework or you can use Sitemesh which I tend to prefer over Tiles, personally.

But I need somehting to handle forms. What I like about faces is the automatic bean population on submit, auto-redisplay on error, etc.

Most frameworks provide this. Some just make it easier than others.

I have a multi-step form that is entirely dynamic. That is, the number of inputs on each page, and their range of valid values is entirely dependent on the user's current context. Anyone know of any other frameworks that make this easy?

There's been talks recently on the Stripes mailing list of developers doing this with great ease and success.

You can mix ordinary servlets, Struts, and whatever other j2ee-compliant techniques you want in with JSF and JSF won't mind.

I really find that hard to believe.
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dudley Dawson:
That is, the number of inputs on each page, and their range of valid values is entirely dependent on the user's current context. Anyone know of any other frameworks that make this easy?[/QB]


This is an extremely simple thing to do with JBoss Seam using their conversational model. You should take a look at their examples.
 
Dudley Dawson
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Hung Tang:

This is an extremely simple thing to do with JBoss Seam using their conversational model. You should take a look at their examples.



Yeah - we are considering moving some other projects to seam. I'm going to give it a look for this one. But, i fear it may be overkill for this project. With seam, doesn't every object in session have to be a stateless session bean? And I believe that seam requires you to use a ubiquitous navigation/flow framework, correct?
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dudley Dawson:
With seam, doesn't every object in session have to be a stateless session bean?


No. Seam works fine with regular javabeans. I'm using the regular javabean model just fine.

Originally posted by Dudley Dawson:
And I believe that seam requires you to use a ubiquitous navigation/flow framework, correct?


"ubiquitous" ? Not sure what you mean by that.

You can use JSF navigation system or you can use Seam's navigation system which is much more flexible.
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic