2 Replies Latest reply on Apr 1, 2011 4:44 PM by jobmathew

    aj4:keepAlive is not working properly for me

    fmateo

      Hi All! I'm testing richfaces and ajax4java for a new project.
      I tried to use keepAlive control to maintain one backing bean property between ajax request and a I got this error:

      "<a4j:keepAlive beanName="#{productoBean.idProducto}"> Must be literal"

      From richfaces documentation this should be valid.

      May anyone tell me wich's the problem here?

      Thanks

        • 1. Re: aj4:keepAlive is not working properly for me
          danielk

          Perhaps i am wrong, but can it be that you should only use defined beans? Your beanName does not compare to a bean, because you point to a field of a bean. If "Must be literal" is what i think, you only can use #{LITERAL} where LITERAL is one of your configured beans from faces-config.xml. So 2 possibilities:

          1.) Just keep the whole productoBean for your ajax request:

          <a4j:keepAlive beanName="#{productoBean}">


          2.) Also define idProducto as another bean and use it instead of productoBean:

          <a4j:keepAlive beanName="#{idProducto}">


          Bed is waiting, good night :)

          • 2. aj4:keepAlive is not working properly for me
            jobmathew

            Try it  with out EL exression

             

            <a4j:keepAlive beanName="productoBean.idProducto">