myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Weßendorf (JIRA) <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3112) Cannot convert org.apache.webbeans.el.WrappedValueExpression@168ae94f of type class org.apache.myfaces.view.facelets.el.TagValueExpressionUEL to class javax.el.MethodExpression
Date Tue, 19 Apr 2011 08:13:05 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021463#comment-13021463
] 

Matthias Weßendorf commented on MYFACES-3112:
---------------------------------------------

However.....


when I change the "valueChangeListener" attribute to a different name (e.g. "trigger"), it
works:

<kickstart:inputPassword id="password" value="#{createEmployee.employee.password}" trigger="#{createEmployee.checkPassword}"
/>


<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:composite="http://java.sun.com/jsf/composite">
  <head/>
  <body>

    <composite:interface>
      <composite:attribute name="id" required="true" />
      <composite:attribute name="value" required="true" />
      <composite:attribute name="trigger" required="true" method-signature="void f(javax.faces.event.ValueChangeEvent)"
targets="inputField" />
      <composite:editableValueHolder name="inputField" />
    </composite:interface>

    <composite:implementation>
    
    <div id="#{cc.attrs.id}">

          <h:inputSecret id="inputField" required="true" value="#{cc.attrs.value}" valueChangeListener="#{cc.attrs.trigger}">
             <f:ajax event="valueChange" execute="@this" render="passwordHint pageForm:globalMessages"
/>
          </h:inputSecret>
          <h:outputText id="passwordHint" />
    </div>


    </composite:implementation>
  </body>
</html>

> Cannot convert org.apache.webbeans.el.WrappedValueExpression@168ae94f of type class org.apache.myfaces.view.facelets.el.TagValueExpressionUEL
to class javax.el.MethodExpression
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3112
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3112
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.5
>         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_24
> Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.6.7" arch: "x86_64" Family: "mac"
> MyFaces 2.0.5
> OWB: 1.1.0
> CoDI 0.9.4
>            Reporter: Matthias Weßendorf
>
> In my "newEmployee.xhtml" I am using a custom facelets component, like:
> <kickstart:inputPassword id="password" value="#{createEmployee.employee.password}"
valueChangeListener="#{createEmployee.checkPassword}" />
> The inputPassword.xhtml looks like:
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:f="http://java.sun.com/jsf/core"
>       xmlns:h="http://java.sun.com/jsf/html"
>       xmlns:ui="http://java.sun.com/jsf/facelets"
>       xmlns:composite="http://java.sun.com/jsf/composite">
>   <head/>
>   <body>
>     <composite:interface>
>       <composite:attribute name="id" required="true" />
>       <composite:attribute name="value" required="true" />
>       <composite:attribute name="valueChangeListener" required="true" method-signature="void
f(javax.faces.event.ValueChangeEvent)" targets="inputField" />
>       <composite:editableValueHolder name="inputField" />
>     </composite:interface>
>     <composite:implementation>
>     
>     <div id="#{cc.attrs.id}">
>           <h:inputSecret id="inputField" required="true" value="#{cc.attrs.value}"
valueChangeListener="#{cc.attrs.valueChangeListener}">
>              <f:ajax event="valueChange" execute="@this" render="passwordHint pageForm:globalMessages"
/>
>           </h:inputSecret>
>           <h:outputText id="passwordHint" />
>     </div>
>     </composite:implementation>
>   </body>
> </html>
> When I type in a value, and move the focus away (to trigger the valueChange event), I
am getting the below stack-trace in the console:
> SEVERE: java.lang.IllegalArgumentException: Cannot convert /newEmployee.xhtml at line
39 and column 160 valueChangeListener="#{createEmployee.checkPassword}": org.apache.webbeans.el.WrappedValueExpression@168ae94f
of type class org.apache.myfaces.view.facelets.el.TagValueExpressionUEL to class javax.el.MethodExpression
> javax.faces.event.AbortProcessingException: java.lang.IllegalArgumentException: Cannot
convert /newEmployee.xhtml at line 39 and column 160 valueChangeListener="#{createEmployee.checkPassword}":
org.apache.webbeans.el.WrappedValueExpression@168ae94f of type class org.apache.myfaces.view.facelets.el.TagValueExpressionUEL
to class javax.el.MethodExpression
> 	at javax.faces.event.MethodExpressionValueChangeListener.processValueChange(MethodExpressionValueChangeListener.java:100)
> 	at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:66)
> 	at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:344)
> 	at javax.faces.component.UIInput.broadcast(UIInput.java:333)
> 	at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:972)
> 	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:273)
> 	at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1284)
> 	at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:757)
> 	at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:34)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
> 	at org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.execute(CodiLifecycleWrapper.java:93)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1283)
> 	at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:115)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1254)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:481)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:516)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:230)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> 	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:268)
> 	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:99)
> 	at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:107)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1254)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:481)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:516)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:230)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> 	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)
> 	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:353)
> 	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:598)
> 	at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1076)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
> 	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
> 	at java.lang.Thread.run(Thread.java:680)
> Caused by: java.lang.IllegalArgumentException: Cannot convert /newEmployee.xhtml at line
39 and column 160 valueChangeListener="#{createEmployee.checkPassword}": org.apache.webbeans.el.WrappedValueExpression@168ae94f
of type class org.apache.myfaces.view.facelets.el.TagValueExpressionUEL to class javax.el.MethodExpression
> 	at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:397)
> 	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:222)
> 	at org.apache.webbeans.el.WrappedValueExpression.getValue(WrappedValueExpression.java:68)
> 	at org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:85)
> 	at org.apache.myfaces.view.facelets.el.LocationValueExpression.getValue(LocationValueExpression.java:90)
> 	at org.apache.myfaces.view.facelets.el.ValueExpressionMethodExpression.getMethodExpression(ValueExpressionMethodExpression.java:92)
> 	at org.apache.myfaces.view.facelets.el.ValueExpressionMethodExpression.invoke(ValueExpressionMethodExpression.java:58)
> 	at org.apache.myfaces.view.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:83)
> 	at javax.faces.event.MethodExpressionValueChangeListener.processValueChange(MethodExpressionValueChangeListener.java:78)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message