You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jeroen Verhagen <je...@gmail.com> on 2007/12/02 20:59:47 UTC
Problem creating custom component: IndexOutOfBoundsException
Hi all,
I using myfaces 1.2.0 to create a custom component that consist of
standard components. My problem is that this custom component renders
ok but when I submit the form that contains it I get an
IndexOutOfBoundsException.
Can anyone please tell me what's causing this or what's the problem?
Here's the exception:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:740)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:743)
at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:743)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:300)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:354)
at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:85)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
....
And here's the custom component code:
public UIBooleanFieldset() {
setConverter(new BooleanConverter());
setRendererType(null);
Application application = FacesContext.getCurrentInstance().getApplication();
HtmlSelectOneRadio htmlSelectOneRadio = (HtmlSelectOneRadio)
application.createComponent(HtmlSelectOneRadio.COMPONENT_TYPE);
htmlSelectOneRadio.setId(getId() + "_radios");
ValueBinding radioBinding =
application.createValueBinding("#{persoonBean.sex}");
htmlSelectOneRadio.setValueBinding("value", radioBinding);
htmlSelectOneRadio.setLayout("pageDirection");
UISelectItems selectItems = (UISelectItems)
application.createComponent(UISelectItems.COMPONENT_TYPE);
ValueBinding selectBinding =
application.createValueBinding("#{persoonBean.sexItems}");
selectItems.setValueBinding("value", selectBinding);
htmlSelectOneRadio.getChildren().add(selectItems);
getChildren().add(htmlSelectOneRadio);
}
Thanks for any help!
--
regards,
Jeroen
Re: Re: which Tomahwak version for Trinidad 1.2.4?
Posted by Matthias Wessendorf <ma...@apache.org>.
:-)
On Dec 14, 2007 3:19 PM, <wo...@pta.de> wrote:
>
> It does not matter anymore. Now I use the jscookmenu from the source
> (jscook.yuanheng.org) so I do not deal with Tomahawk ;)
>
>
>
>
> "Matthias Wessendorf" <ma...@apache.org>
> Gesendet von: mwessendorf@gmail.com
>
> 14.12.2007 15:12
>
> Bitte antworten an
> "MyFaces Discussion" <us...@myfaces.apache.org>
>
>
> An "MyFaces Discussion" <us...@myfaces.apache.org>
>
> Kopie
>
> Thema Re: which Tomahwak version for Trinidad 1.2.4?
>
>
>
>
>
>
> no idea; not sure if some Trinidad 1.2.x are using Tomahawk
> -M
>
> On Dec 14, 2007 9:57 AM, <wo...@pta.de> wrote:
> >
> > Hi,
> >
> > for Trinidad 1.2.4 could anyone indicate to me which version of Tomahwak
> is
> > really usable regarding
> > the jscookmenu? Or at leat, let's say, least problematic regarding
> > jscookmenu?
> >
> > Thanks,
> > Wolfgang.
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org
Antwort: Re: which Tomahwak version for Trinidad 1.2.4?
Posted by wo...@pta.de.
It does not matter anymore. Now I use the jscookmenu from the source
(jscook.yuanheng.org) so I do not deal with Tomahawk ;)
"Matthias Wessendorf" <ma...@apache.org>
Gesendet von: mwessendorf@gmail.com
14.12.2007 15:12
Bitte antworten an
"MyFaces Discussion" <us...@myfaces.apache.org>
An
"MyFaces Discussion" <us...@myfaces.apache.org>
Kopie
Thema
Re: which Tomahwak version for Trinidad 1.2.4?
no idea; not sure if some Trinidad 1.2.x are using Tomahawk
-M
On Dec 14, 2007 9:57 AM, <wo...@pta.de> wrote:
>
> Hi,
>
> for Trinidad 1.2.4 could anyone indicate to me which version of Tomahwak
is
> really usable regarding
> the jscookmenu? Or at leat, let's say, least problematic regarding
> jscookmenu?
>
> Thanks,
> Wolfgang.
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org
Re: which Tomahwak version for Trinidad 1.2.4?
Posted by Matthias Wessendorf <ma...@apache.org>.
no idea; not sure if some Trinidad 1.2.x are using Tomahawk
-M
On Dec 14, 2007 9:57 AM, <wo...@pta.de> wrote:
>
> Hi,
>
> for Trinidad 1.2.4 could anyone indicate to me which version of Tomahwak is
> really usable regarding
> the jscookmenu? Or at leat, let's say, least problematic regarding
> jscookmenu?
>
> Thanks,
> Wolfgang.
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org
Re: Problem creating custom component: IndexOutOfBoundsException
Posted by Matthias Wessendorf <ma...@apache.org>.
thx
On Dec 3, 2007 9:56 PM, Jeroen Verhagen <je...@gmail.com> wrote:
> This is the issue: https://issues.apache.org/jira/browse/MYFACES-1783
>
> regards,
>
> Jeroen
>
>
>
> On Dec 3, 2007 12:18 PM, Jeroen Verhagen <je...@gmail.com> wrote:
> > Hi Matthias,
> >
> > On Dec 3, 2007 8:08 AM, Matthias Wessendorf <ma...@apache.org> wrote:
> > >
> > > can you file an issue ticket for this?
> >
> > Ok, I will...
> >
> > > My hope was, that it was fixed during working on 1.21 ;-)
> >
> > Is this a known bug? Is there a workaround for it?
> >
> >
> > --
> >
> > regards,
> >
> > Jeroen
> >
>
>
>
> --
>
> regards,
>
> Jeroen
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org
Re: Problem creating custom component: IndexOutOfBoundsException
Posted by Jeroen Verhagen <je...@gmail.com>.
This is the issue: https://issues.apache.org/jira/browse/MYFACES-1783
regards,
Jeroen
On Dec 3, 2007 12:18 PM, Jeroen Verhagen <je...@gmail.com> wrote:
> Hi Matthias,
>
> On Dec 3, 2007 8:08 AM, Matthias Wessendorf <ma...@apache.org> wrote:
> >
> > can you file an issue ticket for this?
>
> Ok, I will...
>
> > My hope was, that it was fixed during working on 1.21 ;-)
>
> Is this a known bug? Is there a workaround for it?
>
>
> --
>
> regards,
>
> Jeroen
>
--
regards,
Jeroen
Re: Problem creating custom component: IndexOutOfBoundsException
Posted by Jeroen Verhagen <je...@gmail.com>.
Hi Matthias,
On Dec 3, 2007 8:08 AM, Matthias Wessendorf <ma...@apache.org> wrote:
>
> can you file an issue ticket for this?
Ok, I will...
> My hope was, that it was fixed during working on 1.21 ;-)
Is this a known bug? Is there a workaround for it?
--
regards,
Jeroen
which Tomahwak version for Trinidad 1.2.4?
Posted by wo...@pta.de.
Hi,
for Trinidad 1.2.4 could anyone indicate to me which version of Tomahwak
is really usable regarding
the jscookmenu? Or at leat, let's say, least problematic regarding
jscookmenu?
Thanks,
Wolfgang.
Re: Problem creating custom component: IndexOutOfBoundsException
Posted by Matthias Wessendorf <ma...@apache.org>.
Ok,
can you file an issue ticket for this?
My hope was, that it was fixed during working on 1.21 ;-)
Thx,
Matthias
On Dec 2, 2007 11:21 PM, Jeroen Verhagen <je...@gmail.com> wrote:
> Hi Matthias,
>
> On Dec 2, 2007 10:38 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> > can you try 1.2.1 ?
>
> I tried it with a version I got from here:
> http://people.apache.org/repo/m2-snapshot-repository/ but no good.
>
> I had the same problem with the Sun RI by the way, i tried jsf-impl
> 1.2-b19 and jsf-api 1.2_02.
>
> --
>
> regards,
>
> Jeroen
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org
Re: Problem creating custom component: IndexOutOfBoundsException
Posted by Jeroen Verhagen <je...@gmail.com>.
Hi Matthias,
On Dec 2, 2007 10:38 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> can you try 1.2.1 ?
I tried it with a version I got from here:
http://people.apache.org/repo/m2-snapshot-repository/ but no good.
I had the same problem with the Sun RI by the way, i tried jsf-impl
1.2-b19 and jsf-api 1.2_02.
--
regards,
Jeroen
Re: Problem creating custom component: IndexOutOfBoundsException
Posted by Matthias Wessendorf <ma...@apache.org>.
can you try 1.2.1 ?
On Dec 2, 2007 8:59 PM, Jeroen Verhagen <je...@gmail.com> wrote:
> Hi all,
>
> I using myfaces 1.2.0 to create a custom component that consist of
> standard components. My problem is that this custom component renders
> ok but when I submit the form that contains it I get an
> IndexOutOfBoundsException.
>
> Can anyone please tell me what's causing this or what's the problem?
>
> Here's the exception:
>
> java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> at java.util.ArrayList.get(ArrayList.java:321)
> at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:740)
> at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:743)
> at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:743)
> at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:300)
> at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:354)
> at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:85)
> at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
> at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> ....
>
> And here's the custom component code:
>
> public UIBooleanFieldset() {
> setConverter(new BooleanConverter());
> setRendererType(null);
>
> Application application = FacesContext.getCurrentInstance().getApplication();
> HtmlSelectOneRadio htmlSelectOneRadio = (HtmlSelectOneRadio)
> application.createComponent(HtmlSelectOneRadio.COMPONENT_TYPE);
>
> htmlSelectOneRadio.setId(getId() + "_radios");
> ValueBinding radioBinding =
> application.createValueBinding("#{persoonBean.sex}");
> htmlSelectOneRadio.setValueBinding("value", radioBinding);
> htmlSelectOneRadio.setLayout("pageDirection");
>
> UISelectItems selectItems = (UISelectItems)
> application.createComponent(UISelectItems.COMPONENT_TYPE);
> ValueBinding selectBinding =
> application.createValueBinding("#{persoonBean.sexItems}");
> selectItems.setValueBinding("value", selectBinding);
>
> htmlSelectOneRadio.getChildren().add(selectItems);
> getChildren().add(htmlSelectOneRadio);
> }
>
>
> Thanks for any help!
>
>
> --
>
> regards,
>
> Jeroen
>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org