3 Replies Latest reply on Jun 26, 2006 6:06 PM by cptnkirk

    @RequestParameter?

    bkyrlach

      I have the following SLSB...

      @Stateless
      @Name("infozapAction")
      public class InfozapActionImpl implements InfozapAction
      {
      @RequestParameter("schoolList")
      private String schoolList;

      @Out
      private InfoZapDTO izdto;

      public void createInfoZapDTO()
      {
      System.out.println(schoolList);
      izdto = new InfoZapDTO(schoolList);
      }
      }

      and the following pages.xml...


      <page view-id="/ben/onepageiz.xhtml" action="#{infozapAction.createInfoZapDTO}"/>


      However, when I navigate to the following url...

      http://ben.gradview.com:8080/ben/onepageiz.jsf?schoolList=2525

      The console outputs "null". Is my usage of @RequestParameter correct? Could this possibly be a bug?

        • 1. Re: @RequestParameter?
          bkyrlach

          Anyone? This seems to be the correct setup based on the example of a RESTful app in the Seam documentation. Unless I'm being completly stupid, which, knowing me, isn't beyond possability.

          • 2. Re: @RequestParameter?
            bkyrlach

            Doh...

            Apparently I didn't search hard enough before. My SLSB was missing the...

            @Interceptors(SeamInterceptor.class)

            at the top of the class. In my defense, the documentation for Seam doesn't show this in the SLSB from the example of a RESTful application. I'm sure if this were added to the documentation, it could save some people (like me) many headaches.

            • 3. Re: @RequestParameter?

              The @Interceptors annotation isn't necessary when you define your interceptor-binding in your ejb-jar.xml. Like so: http://docs.jboss.com/seam/1.0.1.GA/reference/en/html/tutorial.html#d0e641

              The code examples assume you have a configuration like the tutorial in chapter 1 of the documentation.