-
1. Re: restful search using param
daxxy Jan 18, 2010 7:33 PM (in response to vdeminico)Valerio, you cannot submit form data using s:link.
I have only recently started understanding this myself. Here you might find a good explanation.
http://seamframework.org/Community/UnderstandingSbuttonHcommandButtonAndRequestParameter
I think you want to use h:commandLink to submit the input. Then in search.page.xml you want to wire your parameters to the searchTextAction bean like this
<param name="prefix" value="bedandbreakfast"/> <param name="sid" value="#{searchTextAction.selectedSearchItem.sid}"/> <param name="suffix" value="#{searchTextAction.selectedSearchItem.url}"/>
These parameters will get set before search.xhtml is rendered and will result in a URL somewhat like this
search.seam?prefix=bedandbreakfast&sid=<searchTextAction.selectedSearchItem.sid here>&suffix=<searchTextAction.selectedSearchItem.url here>
-
2. Re: restful search using param
vdeminico Jan 19, 2010 12:05 PM (in response to vdeminico)Ok, thanks for your reply Tanya.
Now I have an url like this:search.seam?regione=CAMPANIA&provincia=BENEVENTO&comune=APOLLOSA&cid=9
I'd want a restful url, like
/prefix/CAMPANIA/BENEVENTO/APOLLOSA
Normally I do it using the seam (third part) url rewrite filter, but now it doesn't work. This behaviour is correct, because the filter acts before the jsf one. For me it's impossible to solve the problem without using an explicit re-rendering.
Any ideas?
Valerio.