2 Replies Latest reply on Jan 18, 2011 11:07 AM by ilya40umov

    usage of cookies in RichFaces

    ilya40umov

      Have you ever thought guys about why JSF does not use cookies? I don't have any idea why this feature is not used in JSF. My idea is not create an ability(annotation, tag or something) to save some data into cookies. This can help to keep user setting in his/her browser and also limit data to be stored in a session scope.

      What do you think guys?

        • 1. usage of cookies in RichFaces
          nbelaevski

          Ilya,

           

          JSF provides ExternalContext methods to operate with cookies. I think implementation of HTTP cookies will be the main problem with wrapping such functionality as a component - cookies should be added before response is committed, however component rendering won't guarantee this. 

          • 2. usage of cookies in RichFaces
            ilya40umov

            Yes. I understand that practically it works because these's always some sort of buffering and we even can add some cookies at the moment when a part of response already has been put into the stream writer. So the main problem is that JSF is not a complete MVC and thus M and C are not always before rendering V.