0 Replies Latest reply on Jun 2, 2009 8:17 PM by hordine

    Action properties not being set by setValue()

    hordine
      Hi everyone,

      I wrote a SeamTest class where I call setValue() to set an action class' properties' values. When I call invokeMethod() to invoke a method of that class, it's properties are still null.

      Could anyone please help?

      Here's my test method:

      @Test
      public void solicitaAcesso() throws Exception {
        new FacesRequest() {
          @Override
          protected void invokeApplication() {
            setValue("#{login}", "TestNG");
            setValue("#{nome}", "Test N. G.");
            String result = (String) invokeAction("#{solicitarAcessoController.solicitaAcesso}");
          }
        }
      }

      And here's my action class:

      @SuppressWarnings("serial")
      @Name("solicitarAcessoController")
      @Scope(ScopeType.PAGE)
      public class SolicitarAcessoController {
        ...
        @In(create=true)
        @Out
        private String login;
       
        @In(create=true)
        @Out
        private String nome;
        ...
      }

      Thanks in advance.