3 Replies Latest reply on Feb 18, 2010 1:57 PM by nbelaevski

    RequestContext in RichFaces

    jmiguel77

      Hi

       

      I would like to know how to get the RequestContext in RichFaces. The main idea is to create a project for Andromda with RichFaces, not trinidad. I have to migrate some classes, and one of them has this code:

       

      public class AdfFacesContextWrapper
          implements java.io.Serializable
      {   
          private transient org.richfaces.context.RequestContext currentInstance = null;
         
          public org.richfaces.context.RequestContext getCurrentInstance()
          {
              if (this.currentInstance == null)
              {
                  this.currentInstance =
              }
              return this.currentInstance;
          }
         
          private static final long serialVersionUID = 1L;
      }

       

      i would like to know how to make this work in a RichFaces environment

       

      thanks

        • 1. Re: RequestContext in RichFaces
          nbelaevski

          Hi,

           

          You can use org.richfaces.context.RequestContext.getInstance() method.

          • 2. Re: RequestContext in RichFaces
            jmiguel77

            thanks a lot

             

            after reading some of the code involved in that wrapper, we decided to wrap the FacesContext, not the richfaces RequestContext

             

            anothes question; in trinidad, they have something called the PageFlowContext; what i understand is that is a context between the Session and Request contexts

             

            in seam, there is the conversation context; but i don't want to get involved with seam; so, is there any similar scope in richfaces ?? or my only alternative is to use the sessionScope ??

             

            thanks again

            • 3. Re: RequestContext in RichFaces
              nbelaevski
              You can use a4j:keepAlive tag or @KeepAlive annotation.