s:selectItems doesn't reload when backing collection content changes
--------------------------------------------------------------------
Key: JBSEAM-4382
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4382
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.1.2.GA
Environment: Seam 2.1.2.GA / jdk1.6.0_14/ windows xp / jboss-5.1.0.GA
Reporter: Christof Van Hove
links to the problem in the forum:
http://seamframework.org/Community/SselectItemsDoesntReloadWhenObjectIsAd...
http://seamframework.org/Community/SselectItemsValueAttributeNotUpdated
The selectItems only get updated if the reference to the backing collection changes:
explanation from Gena:
------------------------------------
it's a bug the line 159 within the Method Object
org.jboss.seam.ui.component.UISelectItems.getValue():
Line 159: if (selectItems == null || originalValue == null ||
!originalValue.equals(super.getValue()))
and as you can see, originalValue.equals(super.getValue()) is always true as of
implementation of AbstractList
Line 479: AbstractList.equals if (o == this) return true
So if our base collection still be the same, selectItems doesn't refresh. And this
occurs, if the selectItems was already initialized within the same request but with
another count of elements (ie. for validate/convert the applied request values) there is
no chance to refresh the selectItems unless recreating the collecion - so it's a bug.
The new collection resolves the problem, because is not equals to cached one as of
AbstractList contract.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira