public void setExtends(String extend) { throwIfConfigured(); this.inherit = extend; }
public void setName(String name) { throwIfConfigured(); this.name = name; }
public void setType(String type) { throwIfConfigured(); this.type = type; Class dynaBeanClass = DynaActionForm.class; Class formBeanClass = formBeanClass(); if (formBeanClass != null) { if (dynaBeanClass.isAssignableFrom(formBeanClass)) { this.dynamic = true; } else { this.dynamic = false; } } else { this.dynamic = false; } }
/** * Add a new <code>FormPropertyConfig</code> instance to the set * associated with this module. * * @param config The new configuration instance to be added * @throws IllegalArgumentException if this property name has already been * defined */ public void addFormPropertyConfig(FormPropertyConfig config) { throwIfConfigured(); if (formProperties.containsKey(config.getName())) { throw new IllegalArgumentException("Property " + config.getName() + " already defined"); } formProperties.put(config.getName(), config); }
/** * <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()); } } }
throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { throwIfConfigured();