[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-890) UISelectItems leaks memory/state
Guy Veraghtert (JIRA)
jira-events at lists.jboss.org
Wed Feb 21 10:54:35 EST 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-890?page=comments#action_12353817 ]
Guy Veraghtert commented on JBSEAM-890:
---------------------------------------
Why can't the NullableSelectItem return null when getValue() is called? Then, you don't need the ConverterChain and the NoSelectionConverter.
We cannot go in production with this memory leak, so I have to patch Seam if no fix is provided in 1.1.7GA
As a side remark: in JSF 1.2 you don't need a converterchain, as you can just add a SelectItem with null as value:
selectItems.add(new SelectItem(null, getNoSelectionLabel()).
> UISelectItems leaks memory/state
> --------------------------------
>
> Key: JBSEAM-890
> URL: http://jira.jboss.com/jira/browse/JBSEAM-890
> Project: JBoss Seam
> Issue Type: Bug
> Components: JSF
> Affects Versions: 1.1.7.GA
> Reporter: Guy Veraghtert
> Assigned To: Peter Muir
>
> When you use UISelectItems with a no selection label, a ConverterChain is set as the converter of the component. As the converter is part of the component state, upon a postback that converchain will be restored. However, when addNoSelectionLabel() is called in UISelectItems (this method is called indirectly when getValue() is called), a new ConverterChain instance is created and set as the converter of the component, the original converter of that component (which was already a converterchain) will be added to the new ConverterChain. As a result, NoSelectionConverter will be added to the chain more than once, and worse: memory leaks/state grows and grows when multiple postbacks are made to the same page (as the chain grows and grows).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list