tags:

views:

1339

answers:

3

I have a query form that I would like to submit as a GET request so the result page may be bookmarked and otherwise RESTful. It's your classical text field with a submit button. How do I induce Seam/JSF to use GET and include the query expression as a parameter rather than POST, the default?

+1  A: 

Hi, you can use a PhaseListener to convert POST requests to GET requests or just to interpret GET requests so that they can be bookmarkable.

This page should explain in more detail:

http://balusc.blogspot.com/2007/03/post-redirect-get-pattern.html

Phill Sacre
Interesting, but it seems a bit like a sledgehammer when I only need to do this for one page.
sblundy
+2  A: 

All you need to do is enable the SeamFilter in web.xml. See Blog Example for an example RESTful application using Seam. The key is to use a Seam page parameter, defined in WEB-INF/pages.xml

Joe Dean
+1  A: 

If you use the s:button or s:link, your form will be using GET method

Shervin