/** * Freeze the configuration of this component. */ public void freeze() { configured = true; FormPropertyConfig[] fpconfigs = findFormPropertyConfigs(); for (int i = 0; i < fpconfigs.length; i++) { fpconfigs[i].freeze(); } }
/** * Freeze the configuration of this component. */ public void freeze() { super.freeze(); FormPropertyConfig[] fpconfigs = findFormPropertyConfigs(); for (int i = 0; i < fpconfigs.length; i++) { fpconfigs[i].freeze(); } }
public void initialize(FormBeanConfig config) { FormPropertyConfig props[] = config.findFormPropertyConfigs(); for (int i = 0; i < props.length; i++) { set(props[i].getName(), props[i].initial()); } }
/** * <p>Initialize the specified form bean.</p> * * @param config The configuration for the form bean to initialize. */ public void initialize(FormBeanConfig config) { FormPropertyConfig[] props = config.findFormPropertyConfigs(); for (int i = 0; i < props.length; i++) { set(props[i].getName(), props[i].initial()); } }
FormPropertyConfig[] props = config.findFormPropertyConfigs();
/** * <p>Instantiate and return a new {@link DynaActionForm} instance, * associated with this <code>DynaActionFormClass</code>. The properties * of the returned {@link DynaActionForm} will have been initialized to * the default values specified in the form bean configuration * information.</p> * * @return A new {@link DynaActionForm} instance. * @throws IllegalAccessException if the Class or the appropriate * constructor is not accessible * @throws InstantiationException if this Class represents an abstract * class, an array class, a primitive type, * or void; or if instantiation fails for * some other reason */ public DynaBean newInstance() throws IllegalAccessException, InstantiationException { DynaActionForm dynaBean = (DynaActionForm) getBeanClass().newInstance(); dynaBean.setDynaActionFormClass(this); FormPropertyConfig[] props = config.findFormPropertyConfigs(); for (int i = 0; i < props.length; i++) { dynaBean.set(props[i].getName(), props[i].initial()); } return (dynaBean); }
/** * <p>Instantiate and return a new {@link DynaActionForm} instance, * associated with this <code>DynaActionFormClass</code>. The * properties of the returned {@link DynaActionForm} will have been * initialized to the default values specified in the form bean * configuration information.</p> * * @exception IllegalAccessException if the Class or the appropriate * constructor is not accessible * @exception InstantiationException if this Class represents an abstract * class, an array class, a primitive type, or void; or if instantiation * fails for some other reason */ public DynaBean newInstance() throws IllegalAccessException, InstantiationException { DynaActionForm dynaBean = (DynaActionForm) getBeanClass().newInstance(); dynaBean.setDynaActionFormClass(this); FormPropertyConfig props[] = config.findFormPropertyConfigs(); for (int i = 0; i < props.length; i++) { dynaBean.set(props[i].getName(), props[i].initial()); } return (dynaBean); }
FormPropertyConfig[] fpc = beanConfig.findFormPropertyConfigs();
FormPropertyConfig[] descriptors = config.findFormPropertyConfigs();
FormPropertyConfig descriptors[] = config.findFormPropertyConfigs(); if (descriptors == null) { descriptors = new FormPropertyConfig[0];
/** * <p>Compare the form properties of this bean with that of the given and * copy those that are not present.</p> * * @param config The form bean config to copy properties from. * @see #inheritFrom(FormBeanConfig) */ protected void inheritFormProperties(FormBeanConfig config) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { throwIfConfigured(); // Inherit form property configs FormPropertyConfig[] baseFpcs = config.findFormPropertyConfigs(); for (int i = 0; i < baseFpcs.length; i++) { FormPropertyConfig baseFpc = baseFpcs[i]; // Do we have this prop? FormPropertyConfig prop = this.findFormPropertyConfig(baseFpc.getName()); if (prop == null) { // We don't have this, so let's copy it prop = (FormPropertyConfig) RequestUtils.applicationInstance(baseFpc.getClass() .getName()); BeanUtils.copyProperties(prop, baseFpc); this.addFormPropertyConfig(prop); prop.setProperties(baseFpc.copyProperties()); } } }
FormPropertyConfig[] fpcs = formBean.findFormPropertyConfigs();
FormPropertyConfig props[] = findFormPropertyConfigs(); for (int i = 0; i < props.length; i++) { dynaClass.add(props[i].getName(), props[i].getTypeClass());
FormPropertyConfig[] fpcs = formBean.findFormPropertyConfigs();
FormPropertyConfig[] props = findFormPropertyConfigs();