2 Replies Latest reply on Apr 1, 2008 2:09 PM by Pete Muir

    RequestParameter is null inside Factory method

    Gavin Ellis Newbie

      I'm setting a variable with the @RequestParameter annotation and then wanting to use this in a method annotated with @Factory, but finding the variable is null at this point. When the event handling method is invoked it is then populated as expected. Is this a bug? I have seen guides which claim that the request parameter values should be populated and available inside @Factory annotated methods. Here is the abridged code:

      public class ControllerImpl implements Controller {
              String applicationCode;
              @In(required = true)
              Application application;
              public void destroy() {
              public void processRequest() {
                 // applicationCode is not null in here
              @Factory(value = "application")
              public void initApplication() {
                 // applicationCode is null in here