Help

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

FAQ Category:

Yes, it is very easy to expose REST style bookmarkable URLs in a Seam application. In addition, the Seam application can initialize all the necessary backend business logic and persistence components when the user loads that URL. This way, the RESTful URL is not only an information endpoint but also an application interaction start point.

If you just want nice looking URLs, Seam integrates a URL rewriting filter that can manipulate URLs when rendering a page and do internal redirects from GET requests. The bundled dvdstore example shows that feature.

2 comments:
 
27. Jun 2008, 10:34 CET | Link

On http://www.jtict.com/blog/seam-form-url-rewriting/ I described how to create RESTful URLs when submitting a form on a page that has GET parameters in the URL.

But I haven't found a solution to create RESTful URLs when submitting a form that will fail on validation. Is there any solution for that?

ReplyQuote
 
22. Nov 2008, 16:22 CET | Link

Hi Canon,

I've recently released an opensource extension to JSF called PrettyFaces that solves this issue. I believe Seam does this using their Rewriting filter, which currently requires an additional Redirect to re-render the proper URL.

My extension provides validation by causing the form to submit to the current URL, not the JSF view, which saves the additional redirect from occurring.

PrettyFaces

I'm sure that the improvement will soon be picked up by the powers at be, and incorporated into a future Seam release, but it's what I plan on using for the future because it doesn't require a heavy-weight framework.

Post Comment