/* (non-Javadoc)
   * @see com.googlecode.jsu.workflow.AbstractWorkflowPluginFactory#getVelocityParamsForView(java.util.Map, com.opensymphony.workflow.loader.AbstractDescriptor)
   */
  protected void getVelocityParamsForView(
      Map<String, Object> velocityParams, AbstractDescriptor descriptor) {
    ValidatorDescriptor validatorDescriptor = (ValidatorDescriptor) descriptor;
    Map args = validatorDescriptor.getArgs();

    String date1 = (String) args.get("date1Selected");
    String date2 = (String) args.get("date2Selected");
    String windowsDays = (String) args.get("windowsDays");

    velocityParams.put("val-date1Selected", workflowUtils.getFieldFromKey(date1));
    velocityParams.put("val-date2Selected", workflowUtils.getFieldFromKey(date2));
    velocityParams.put("val-windowsDays", windowsDays);
  }
  /* (non-Javadoc)
   * @see com.googlecode.jsu.workflow.AbstractWorkflowPluginFactory#getVelocityParamsForView(java.util.Map, com.opensymphony.workflow.loader.AbstractDescriptor)
   */
  protected void getVelocityParamsForView(
      Map<String, Object> velocityParams, AbstractDescriptor descriptor) {
    ConditionDescriptor conditionDescriptor = (ConditionDescriptor) descriptor;
    Map args = conditionDescriptor.getArgs();

    String sField = (String) args.get("fieldsList");

    Field field = null;

    try {
      field = workflowUtils.getFieldFromKey(sField);
    } catch (Exception e) {
    }

    if (field != null) {
      velocityParams.put("val-fieldSelected", field);
    } else {
      velocityParams.put("val-errorMessage", "Unable to find field '" + sField + "'");
    }

    boolean allowUserInField = getAllowUserInField(args);

    velocityParams.put("allowUserInField-selected", allowUserInField);
  }
 @SuppressWarnings("unchecked")
 protected void getVelocityParamsForView(Map velocityParams, AbstractDescriptor descriptor) {
   velocityParams.put(SELECTED_FIELD, workflowUtils.getFieldFromDescriptor(descriptor, FIELD));
 }