How to get rid of CDI cid and CODI windowId parameter with PrettyFaces?

Splash Forums PrettyFaces Users How to get rid of CDI cid and CODI windowId parameter with PrettyFaces?

This topic contains 5 replies, has 4 voices, and was last updated by  ps4os 10 years, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #17965



    I am new to prettyfaces and basic URL rewriting works fine, but since I am using CODI I still see this ugly windowId like this: “myUrl/view.jsf?windowId=4e8”

    If I wouldn’t not use CODI, but “basic” CDI and conversation there is thos ?cid=1 parameter in the URL.

    How would I hide such things from the user, but still keep the application (and conversations) functional?

    Many thanks


    I don’t think that it is possible to remove these query parameters from the URL without breaking the conversation concept of CDI and CODI. These parameters are embedded in the URL for good reason. They are required to identify the current conversation. How should CODI/CDI know which is the active conversation if they are removed?

    If you want to solve this problem in the JSF world, you could probably embed this conversation identifier in a form instead of in the URL. But this would have to be implemented by the CDI/CODI as it is a completely different concept for conversation identification.



    I am able to remove it, but as you mentioned, it would break the concept of conversation. However this means bookmarkability is not possible once you use conversations?

    The query paramter “cid” would be bookmarked, but after some time the conversation would be timed out. Whenever this bookmarked link is called, it would end up in a NonExistentConversationException, right?


    I think basically you are right! I’m not sure if the CDI implementation (or CODI) will really throw a NonExistentConversationException. In the best case it will simply start a new conversation if the old one timed out. Perhaps this would be acceptable. But I’m note sure about that.

    I’m not a big fan of conversations because they are very “stateful” by design. I worked a long time with MyFaces Orchestra which also supports conversations. But I think it brings more trouble than benefit.

    If anyone has another opinion on this please let me know. I would also be very interested in other thoughts regarding this…. :)



    imho, control flows that are part of a conversation shouldn’t be bookmark-able anyway.



    Yesterday I talked with one of them about it.

    If your window is in your session, you will get the same window.

    Otherwise you get a new window (ID).

    They also have other (i think he called it) window handler. Those handlers work without an ID in the URL. You should get more information about it on their mailing list.

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

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

Comments are closed.