tags:

views:

44

answers:

1

I'm using IceFaces 1.8.2 and trying to get a parameter from the URL using:

((HttpServletRequest) FacesContext.getCurrentInstance()
     .getExternalContext().getRequest()).getParameter(name);

This works fine on the inital request. However, when I do a partialSubmit on a component, it stops working. I'm assuming that its to do with how requests are processed when partial submits are done.

Is there a workaround? At the moment, I'm having to

((HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext()
   .getRequest()).getQueryString();

and manually pass the query string.

Thanks.

+1  A: 
  • why don't you just ignore partial submits. For the sake of bookmarking partial submits shouldn't matter
  • for pretty, bookmarkable urls you can take a look at PrettyFaces
Bozho
What do you mean by ignore partial submits? The whole point of my question is how to get the URL parameter when using partial submits. I am trying to workout how to create a bookmarkable page using icefaces with partial submits enabled for an ajax experience. Can you use prettyfaces in conjunction with icefaces?Thanks.
DD
when you do ajax submits the URL does not change, does it? And yes, I think you can use prettyfaces with icefaces.
Bozho
No the URL stays exactly the same which is why I would expect it to work...however, I cannot use managed bean injection of the parameter via faces-config because if you are on page1?bookId=100 and click on a link on page 1 to page1?bookId=200 the page is not refreshed and the request scoped bean stays with value 100. So I was trying to do in the bean code using the Context above...however, I think its a bug in IceFaces as after a partial submit the URL parameters are not in the request map.
DD
yes, it might be a bug, but I still don't get it why you want to process the URL of partial requests if they do not differ from the URL of the previous normal request.
Bozho
The content of the page is conditional on the URL...after the partial submit it reloads the content
DD