struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmanchu <rman...@gmail.com>
Subject FormBeanConfig extends
Date Tue, 03 May 2005 15:27:02 GMT


hi.

wondering y a new instance of FormPropertyConfig is created? my 
understanding is that Config's r frozen after initialization is 
complete. so y not add the same object?

if a new instance is required, y not have have a newInstance() method 
within the config? (shud load from the same class loader as "this"?)

trying to get a better feel of the Config classes as i try out a general 
<set-property key="" value="" /> solution

as it is, BeanUtils.copyProperties() only performs a shallow copy - does 
  _not_ copy key/value pairs

thanx
riyaz


<codesegment file="FormBeanConfig" method="inheritFormProperties">

// 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);

</codesegment>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message