Examples of FormBeanConfig


Examples of org.apache.struts.config.FormBeanConfig

        String name = mapping.getName();
        if (name == null) {
            return;
        }
        FormBeanConfig config =
            mapping.getApplicationConfig().findFormBeanConfig(name);
        if (config == null) {
            return;
        }
        FormPropertyConfig props[] = config.findFormPropertyConfigs();
        for (int i = 0; i < props.length; i++) {
            set(props[i].getName(), props[i].initial());
        }

    }
View Full Code Here

Examples of org.g4studio.core.mvc.xstruts.config.FormBeanConfig

  public ActionForm findOrCreateActionForm(String formName, String scopeName, ModuleConfig moduleConfig)
      throws IllegalAccessException, InstantiationException {
    Map scope = this.getScope(scopeName);

    ActionForm instance;
    FormBeanConfig formBeanConfig = moduleConfig.findFormBeanConfig(formName);

    if (formBeanConfig == null) {
      throw new IllegalArgumentException("No form config found under " + formName + " in module "
          + moduleConfig.getPrefix());
    }

    instance = (ActionForm) scope.get(formName);

    // ISSUE: Can we recycle the existing instance (if any)?
    if (instance != null) {
      getLogger().trace("Found an instance in scope " + scopeName + "; test for reusability");

      if (formBeanConfig.canReuse(instance)) {
        return instance;
      }
    }

    ActionForm form = formBeanConfig.createActionForm(this);

    // ISSUE: Should we check this call to put?
    scope.put(formName, form);

    return form;
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.