myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Resolved] (MYFACES-3246) java.lang.IndexOutOfBoundsException when CACHE_EL=always
Date Thu, 28 Jul 2011 18:11:10 GMT


Leonardo Uribe resolved MYFACES-3246.

       Resolution: Fixed
    Fix Version/s: 2.1.2
         Assignee: Leonardo Uribe

Thanks for the example. It helps a lot to create a JUnit test using the wonderful FaceletTestCase
base class and fix this one quickly. Just create the files, add some lines of code and that's

The problem is related to FaceletContext.FACELET_CONTEXT_KEY. This key by historical reasons
is assigned on the constructor of DefaultFaceletContext, but this is not good, because in
some cases like ui:include, we should revert to the previous context as soon as the tag has
been applied. So, this key should be put and restored on the places where a DefaultFaceletContext
is created. AjaxHandler.applyAttachedObject retrieve a FaceletContext instance from this key,
so if you move the button before ui:include it will work.

> java.lang.IndexOutOfBoundsException when CACHE_EL=always 
> ---------------------------------------------------------
>                 Key: MYFACES-3246
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.8, 2.1.2
> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
> 	at java.util.ArrayList.RangeCheck(
> 	at java.util.ArrayList.get(
> 	at org.apache.myfaces.view.facelets.impl.DefaultFaceletContext.getTemplateContext(
> 	at org.apache.myfaces.view.facelets.impl.DefaultFaceletContext.isAllowCacheELExpressions(
> 	at org.apache.myfaces.view.facelets.tag.TagAttributeImpl.getValueExpression(
> 	at org.apache.myfaces.view.facelets.tag.jsf.core.AjaxHandler.applyAttachedObject(
> 	at org.apache.myfaces.view.facelets.tag.jsf.core.AjaxHandler.apply(

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message