Examples of ReflectionContextFactory


Examples of com.opensymphony.xwork2.util.reflection.ReflectionContextFactory

    }
    return null;
  }

  public String validators() {
    ReflectionContextFactory reflectionContextFactory = configHelper.getReflectionContextFactory();
    Class<?> clazz = getClassInstance(get("clazz"));
    @SuppressWarnings("rawtypes")
    List<Validator> validators = Collections.emptyList();
    if (clazz != null) validators = configHelper.getActionValidatorManager().getValidators(clazz,
        get("context"));

    Set<PropertyInfo> properties = new TreeSet<PropertyInfo>();
    put("properties", properties);
    if (validators.isEmpty()) { return forward(); }
    int selected = getInt("selected");
    Validator<?> validator = validators.get(selected);
    try {
      @SuppressWarnings("unchecked")
      Map<String, Object> context = reflectionContextFactory.createDefaultContext(validator);
      BeanInfo beanInfoFrom = null;
      try {
        beanInfoFrom = Introspector.getBeanInfo(validator.getClass(), Object.class);
      } catch (IntrospectionException e) {
        logger.error("An error occurred", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.