You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Riyaz Mansoor <rm...@gmail.com> on 2005/05/17 06:55:11 UTC

bug:

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

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

</snip>

bug: key/value properties set in "baseFpc" is not copied to "prop"

sol1: add inline code here
sol2: add method to BaseConfig to inherit a parentConfig's properties 
and call from here/above. possible other similar cases in other configs.

will submit patch, wondering which method is more suitable. ideas?

ps: i can't understand y a new FormPropertyConfig instance is created 
:(. can't v just share the propConfig? it is readonly right?

riyaz


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


Re: bug:

Posted by Hubert Rabago <hr...@gmail.com>.
Key/value properties were just added last week to config objects other
than Action.  Supporting inheritance for them is next on my plate, and
in fact I'm hoping to get to them today (was unavailable the past
couple of weeks for Struts work).

I'm -1 on copying config instances between elements.  Each config has
had its own instance of related config objects and I wouldn't know
what problems might arise by sharing instances.  We may also have a
hard time keeping track of which instances are being shared and which
are not.  Aside from that, I fear that after sharing instances, we'd
next want to "optimize the config objects by sharing similarly
configured elements declared in struts-config".  Leave me out of that
one.

Hubert

On 5/16/05, Riyaz Mansoor <rm...@gmail.com> wrote:
> 
> <snip file="FormBeanConfig" method="inheritFormProperties">
> 
> 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);
> }
> 
> </snip>
> 
> bug: key/value properties set in "baseFpc" is not copied to "prop"
> 
> sol1: add inline code here
> sol2: add method to BaseConfig to inherit a parentConfig's properties
> and call from here/above. possible other similar cases in other configs.
> 
> will submit patch, wondering which method is more suitable. ideas?
> 
> ps: i can't understand y a new FormPropertyConfig instance is created
> :(. can't v just share the propConfig? it is readonly right?
> 
> riyaz
>

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