3 Replies Latest reply on Jan 25, 2008 12:15 PM by kosl

    Problems with @RequestParameter

    kosl

      Dear All,

      I'm developing a statefull session bean, which is at the same time a seam component. I'm using amoung others @Out annotations in it, the outjected data should be initialised based on a parameter from url. I was trying to use both the pages.xml for the url parameter definition, and the @RequestParameter unfortunatelly, neither in the constructor nor in the @PostConstruct method the parameter aith set yet.

      I guess I dont understand well enought how the lifecycle looks like, is there any way to solve my issue?

      Thanks in advance for any hints!

      Kind Regards,

      Karol

        • 1. Re: Problems with @RequestParameter
          kosl

          Ok, it seems like I've solved it.

          The parameter is set in the method annotated with @Create,

          I also tried the @Factory tag but it looks like its working only for injected fields...

          Is the solution with @Create correct ?

          Thanks in advance,

          Karol

          • 2. Re: Problems with @RequestParameter
            damianharvey

            It might be helpful to describe what functionality you require. From what you've said so far it sounds like you want to pass in a parameter that is then outjected for another component to use. Is this correct? So this bean is just an intermediary?

            Cheers,

            Damian.



            • 3. Re: Problems with @RequestParameter
              kosl

              Hi thank you for your answer.

              The bean is not just an intermediary, it is a backing bean for page displaying in some way data in the entity which id I want to pass through url parameter. For example http://URL/page.html?id=324

              After entering page.html the id is passed to the bean and in the @Create method I'm finding the entity with id 324 setting the beans local variables some of them @outjected and whose value is taken from the entity with id 324.

              Kind Regards,

              Karol