2 Replies Latest reply on Aug 8, 2008 3:27 AM by frantisek.kocun

    Weird setting of variables to ActionHandler and TaskControll

    frantisek.kocun

      Hi,
      in TaskControllerHandler I set variables through public set method. It is because I need to set a collection of something, so I parse it in setMethod.


      public class TaskController implements TaskControllerHandler {

      private static Pattern PATTERN = Pattern.compile(";");

      protected String[] transientVariables;

      public void setPersistentVariables(String persistentVariables) {
      this.persistentVariables = PATTERN.split(persistentVariables);
      }

      But in ActionHandler set method doesn't work and I need to do it this way

      public class StartAction implements ActionHandler {

      private static Pattern PATTERN = Pattern.compile(";");

      String persistentVariables;

      and parse persistentVariables later. Why set method doesn't work and if I use name of field in xml which doesn't exist or is private I get no error. It would be more safe to get an error always if field is not accesible or doesn't exist and to use set method if is available (or to require set method).

      Thanks Fero