You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Guy Bashan (JIRA)" <de...@myfaces.apache.org> on 2007/11/06 11:29:50 UTC

[jira] Created: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
------------------------------------------------------------------------------------

                 Key: MYFACES-1760
                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.1.5
            Reporter: Guy Bashan


It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
This is an example for a fregment of code:
---------------------------------------------------------
                            <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
                              <f:selectItems value="#{test_scope.pagePhysicals}" />
                            </t:selectManyCheckbox>
                            <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />

In the bean:
----------------
  public void targetPagesSelectedAction(ActionEvent event)
  {
    Object[] xx = htmlSelect.getSelectedValues();
    FacesContext.getCurrentInstance().renderResponse();
  }

Causes the following exception:
-------------------------------------------
javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
	at java.lang.Thread.run(Thread.java:619)
Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
	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:139)
	... 25 more
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "David Brainard (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540546 ] 

David Brainard commented on MYFACES-1760:
-----------------------------------------

When we change the value binding from a list to an array this problem does not occur.ie in this value-expression "#{test_scope.targetPagePhysicals}" if targetPagePhysicals is an array  this problem wont occur.

I checked the impl. The problem is that when  the selected values are converted, the type of value binding is checked 
    valueType = vb.getType(facesContext);
and if it is an array the selected values are set in a array and if it is a list it is set to an arraylist.

so when getSelectedValues() method is called it just resolves the value and casts it to Object[] and we get the prob.

I have checked with the Sun RI. the prob is present there also.

I have checked the specs.this is wat it is stated in the specs.
"This property is a typesafe alias for the value property,so that the actual state to be used can be acquired via a value expression."

I think we have to check the type of the value returned by value binding before casting to Object[](Unless it has been implemented like that intentionally for some reason). 

pls comment if there is any prob.


> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "Simon Kitching (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540407 ] 

Simon Kitching commented on MYFACES-1760:
-----------------------------------------

The getSelectedValues method certainly assumes the value is an array:

    public Object[] getSelectedValues()
    {
        return (Object[]) getValue();
    }

Note that the spec for UISelectMany says: "Optionally, the component can be preconfigured with zero or more currently selected items, by storing them as an array in the value property of the component.". And the setSelectedValues method takes only an array as a parameter. This suggests that the value should always be an array (ie it would be an error to bind the value to an expression returning a list).

However currently methods compareValues and _createItemValuesIterator both try to handle values that are list types.

Guy, I presume that your value-expression "#{test_scope.targetPagePhysicals}" returns a List?

> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "Guy Bashan (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540737 ] 

Guy Bashan commented on MYFACES-1760:
-------------------------------------

I am not familiar with JSF core code, but I don't think it is implemented like that intentionally, since it seems not reasonable accepting List as value, but failing when trying to get the selected values.

> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "Guy Bashan (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540434 ] 

Guy Bashan commented on MYFACES-1760:
-------------------------------------

indeed.

> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "Guy Bashan (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541636 ] 

Guy Bashan commented on MYFACES-1760:
-------------------------------------

Hi,

I think that the casting on the return is not mandatory:
return (Object[])((List)selectedValues).toArray(); ----> return ((List)selectedValues).toArray();

Guy.

> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>         Attachments: UISelectMany.patch
>
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "Simon Kitching (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540802 ] 

Simon Kitching commented on MYFACES-1760:
-----------------------------------------

Yes, but  my point was that it is not clear whether the fix is to
(a) convert list to array in getSelectedValues, or
(b) report an error if the valueBinding points to a non-array. This error check would need to be done early (not just in getSelectedValues).

I agree the current setup is inconsistent.

> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "David Brainard (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541626 ] 

David Brainard commented on MYFACES-1760:
-----------------------------------------

Hi Simon,

I have added a patch as discussed. Pls look into it.

regards,
David Brainard Sounthiraraj

> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>         Attachments: UISelectMany.patch
>
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "David Brainard (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540819 ] 

David Brainard commented on MYFACES-1760:
-----------------------------------------

Sorry i missed a part:
the conversion logic according to the specs(docs in ri) and impl support only array or arraylist.

so the getSelectedValues() should support only those two " array and arraylist "(There wont be anything else coz they they are converted properly and set ;) . so any error will be thrown at that point itself so no need to wry)

so an else part should be added to the logic which will throw an error since we support only array or an arraylist .



> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "David Brainard (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540814 ] 

David Brainard commented on MYFACES-1760:
-----------------------------------------

this is wat the spec(jsf-1_2-spec) says about Selected values:

name :selected Values  
Type : Object[] or array of primitives
Description : The selected item values of this component. This property is a typesafe alias for the value property, so that the actual state to                                                  be used can be acquired  via a value expression."           

according to this we have to just obtain the value from the value expression and return a primitive or an object[]

So according to me the logic should be as follows:
     Obtain the value through value binding 
      if the value is an array 
              return the value casting it to Object[]
      if the value is a ArrayList
              convert the value to an array, return the array after casting it to Object[]

if this is acceptable pls comment i'l add a patch for this tom.

Regards,
David Brainard Sounthiraraj      

> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MYFACES-1760) Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"

Posted by "David Brainard (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Brainard updated MYFACES-1760:
------------------------------------

    Status: Patch Available  (was: Open)

> Using "getSelectedValues" of "UISelectMany" seems to be causing "ClassCastException"
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1760
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1760
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>            Reporter: Guy Bashan
>
> It seems like calling getSelectedValues method of selectBooleanCheckbox causes exception.
> This is an example for a fregment of code:
> ---------------------------------------------------------
>                             <t:selectManyCheckbox value="#{test_scope.targetPagePhysicals}" layout="pageDirection" converter="PagePhysicalConverter" binding="#{test_scope.htmlSelect}">
>                               <f:selectItems value="#{test_scope.pagePhysicals}" />
>                             </t:selectManyCheckbox>
>                             <t:commandButton value="submitTargetPages" style="width:100px" immediate="true" onclick="submit()" forceId="true" actionListener="#{test_scope.targetPagesSelectedAction}" />
> In the bean:
> ----------------
>   public void targetPagesSelectedAction(ActionEvent event)
>   {
>     Object[] xx = htmlSelect.getSelectedValues();
>     FacesContext.getCurrentInstance().renderResponse();
>   }
> Causes the following exception:
> -------------------------------------------
> javax.servlet.ServletException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.amadesa.admin.model.persistence.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:149)
> 	at com.amadesa.admin.model.persistence.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:56)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.faces.el.EvaluationException: Exception while invoking expression #{test_scope.targetPagesSelectedAction}
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> 	at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:139)
> 	at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
> 	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:139)
> 	... 25 more
> Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.lang.Object;
> 	at javax.faces.component.UISelectMany.getSelectedValues(UISelectMany.java:48)
> 	at com.amadesa.admin.view.bean.test.TestScopeBean.targetPagesSelectedAction(TestScopeBean.java:166)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> 	... 32 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.