You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Rogério Pereira Araújo (JIRA)" <de...@myfaces.apache.org> on 2006/05/25 02:32:30 UTC
[jira] Commented: (MYFACES-1312) dependency injection error with
ArrayList
[ http://issues.apache.org/jira/browse/MYFACES-1312?page=comments#action_12413200 ]
Rogério Pereira Araújo commented on MYFACES-1312:
-------------------------------------------------
i'm using saveState in beanA
> dependency injection error with ArrayList
> -----------------------------------------
>
> Key: MYFACES-1312
> URL: http://issues.apache.org/jira/browse/MYFACES-1312
> Project: MyFaces Core
> Type: Bug
> Components: JSR-127
> Versions: 1.1.3
> Reporter: Rogério Pereira Araújo
> Fix For: 1.1.4-SNAPSHOT
>
> I have 3 beans: beanA, beanB (ArrayList) and beanC, i add some items on beanB from beanA and i need remove few others from beanC, but when i try remove from beanC i'm getting a IndexOutOfBounds exception.
> beanA and beanC is at request scope and beanB is at session scope.
> Look this code:
> public beanA
> {
> private ArrayList beanB;
> public beanA()
> {
> }
> public String addItem()
> {
> if(beanB == null)
> setBeanB(new ArrayList());
> beanB.add("newItem");
> return null;
> }
> public void setBeanB(ArrayList beanB)
> {
> this.beanB = beanB;
> }
> }
> public beanC
> {
> private ArrayList beanB;
> public beanC()
> {
> }
> public void removeItem(ActionEvent event)
> {
> beanB.remove(myDataTable.getRowIndex());
> return null;
> }
> public void setBeanB(ArrayList beanB)
> {
> this.beanB = beanB;
> }
> }
> i haven't added get/set stuff of myDataTable to keep the example simple.
--
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