[solved] wrong value passed from url to injected bean

Splash Forums PrettyFaces Users [solved] wrong value passed from url to injected bean


This topic contains 10 replies, has 2 voices, and was last updated by  Lincoln Baxter III 11 years, 5 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #17763


    Hi all,

    i set up my application, built in icefaces, to use pretty faces. But i have following problem.

    i have managed bean defined like following:






    ControllerBean class looks like following:

    public class ControllerBean {

    private String id;

    //getter, setter for id property


    then i have following rule in my pretty-config.xml

    <url-mapping id=”detail”>

    <pattern value=”/Item/#{ControllerBean.id}”/>



    and my problem:

    i’m navigating to this page via standard action navigation. e.g. like following:

    public String linkAction() {


    return “pretty:detail”;


    the page is displayed correctly and also the url is correct, but when i edit url in the web browser e.g. from /Item/3 to /Item/5 method ControllerBean.setId receives value 3 anyway.

    what is wrong in my solution?

    thanx for any hint


    When you edit the URL, are you pressing enter afterwards? If not, the value has not been sent to the server yet. Changing the URL only affects server state if the request is made by submitting the URL.

    E.g: Changing the URL does not change anything else on the page. So if you submit a form or click a link on the page, the old URL will still be in the HTML source..



    yes, i’m definitely pressing enter key to submit url modification :).



    one more remark.

    when i paste url ‘/Item/5’ into browser address bar, currently visiting different page, id parameter is handled and passed correctly. my problem occurs only, when i’m on page with url /Item/<id> and i modify this <id> value


    Are you using IceFaces? Can you send a sample app that reproduces this issue?



    What version of PrettyFaces, JSF, IceFaces, and which server/version are you using?



    yes, it is an icefaces application running on glassfish app server. i created simple application with the same behavior. What is your email address?



    PrettyFaces 3.0.1, JSF 1.2, IceFaces 1.8.2 and glassfish 2.1.1


    Hey David,

    I hate to say this, but I got your app working, and this is definitely a question you’re going to need to ask on the IceFaces forums; there is nothing wrong with your PrettyFaces configuration.

    The application is intercepting changes to the URL and doing some pretty crazy AJAX/Server-side state manipulation. This is what I meant by “IceFaces does a lot of very bad things.”

    You’ll have to ask them. I’m sorry for making you wait so long for a not-very-helpful answer. I would think there should be a way to disable this in IceFaces, but… I’m no expert there.




    Until then, you may be able to work around the problem by using Named Path Parameters:


Viewing 11 posts - 1 through 11 (of 11 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.