commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BEANUTILS-185) [beanutils] Try to align BeanUtils with JSTL standard tags
Date Sun, 11 Jun 2006 15:33:30 GMT
    [ http://issues.apache.org/jira/browse/BEANUTILS-185?page=comments#action_12415757 ] 

Niall Pemberton commented on BEANUTILS-185:
-------------------------------------------

Yes I agree RowSetDynaClass is confusing/misleading - I wouldn't have chosn to design it the
way it has been, but from a pragmatic point of view it does the job.

<snip>
Don't know if this is a good idea and I suppose we think different here. 
>From a performance point of view, you probably want to add a boolean isReadonly flag as
a parameter in the BasicDynaBean constructor so that you can add a private Map instance variable
representing the unmodifiable map of properties (if isReadonly==true, or the DynaBeanMapDecorator
if false), so that whenever any of the dynabean clients call the getMap() method, only the
first time is the unmodifiable map created. (This performance optimization is probably to
make a difference if you think that the dynabean will be referenced from several JSTL expressions
in the same JSP page.) 
</snip>

I don't think we do think differently here - the implementation I created only needs to be
instantiated once  (not each time getMap() is called)  and cached as you said - and that can
be done lazily, whether its read only or not. I take your point though about having a way
to indicate to the BasicDynaBean whether a modifiable to read only instance should be created
- also the BasicDynaClass too since its newInstance() method creates BasicDynaBean.

> [beanutils] Try to align BeanUtils with JSTL standard tags
> ----------------------------------------------------------
>
>          Key: BEANUTILS-185
>          URL: http://issues.apache.org/jira/browse/BEANUTILS-185
>      Project: Commons BeanUtils
>         Type: Improvement

>  Environment: Operating System: other
> Platform: Other
>     Reporter: Gabriel Belingueres
>     Priority: Minor
>  Attachments: AbstractRowSetDynaClass.java, BasicDirectAccessDynaBean.java, BasicDirectAccessDynaBeanTestCase.java,
BasicIndirectAccessDynaBean.java, DirectAccessDynaBean.java, DirectRowSetDynaClass.java, DynaBeanMapDecorator.java,
DynaBeanMapDecoratorTestCase.java, IndirectAccessDynaBean.java, IndirectRowSetDynaClass.java,
beanutil-diff.txt
>
> Hi,
> I've done some modifications to the beanutils package to better support the use 
> of DynaBeans with the JSTL tags. Some of the changes are discussed in this 
> thread of the commons-user mailing list:
> http://marc.theaimsgroup.com/?l=jakarta-commons-user&m=114669123403779&w=2
> I attach the diff file that comprises changes to the RowSetDynaClass.java file 
> and build.xml file (since I added a TestCase.) Note: Please try to filter 
> carefully the diffs in the build.xml file since they include some local 
> settings I have for compilation on my machine. :-(
> Together with the diff file, I attach the new java files added to the package.
> Regards,
> Gabriel Belingueres
> gaby@ieee.org

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message