jsf - Spring webflow & PrimeFaces expression language - bean method is interpreted as a property in websphere but not tomcat -
i have webflow input:
<input name="allocationconfig" required="true"/>
which used correct controller when searching list of stores in primefaces autocomplete input:
<p:autocomplete completemethod="#{controllerlookup.get(allocationconfig).searchforstore}" ... />
controllerlookup
spring bean returns particular controller (which spring bean) when passed allocationconfig
webflow. controller returns list of stores display in autocomplete input.
this works fine when run on tomcat, when deployed onto websphere, error:
javax.el.propertynotfoundexception: /web-inf/flows/manage-allocation/manage-allocation.xhtml @76,97 completemethod="#{controllerlookup.get(allocationconfig).searchforstore}": property 'get' not found on type com.web.controller.allocations.controllerlookup @ com.sun.faces.facelets.el.tagmethodexpression.invoke(unknown source) @ org.primefaces.component.autocomplete.autocomplete.broadcast(autocomplete.java:459) @ javax.faces.component.uiviewroot.broadcastevents(unknown source) @ javax.faces.component.uiviewroot.processdecodes(unknown source) @ org.springframework.faces.webflow.flowlifecycle.invokephase(flowlifecycle.java:88) @ org.springframework.faces.webflow.flowlifecycle.execute(flowlifecycle.java:69) @ org.springframework.faces.webflow.jsfview.processuserevent(jsfview.java:111) @ org.springframework.webflow.engine.viewstate.handleevent(viewstate.java:225) @ org.springframework.webflow.engine.viewstate.resume(viewstate.java:195) @ org.springframework.webflow.engine.flow.resume(flow.java:537) @ org.springframework.webflow.engine.impl.flowexecutionimpl.resume(flowexecutionimpl.java:259) @ org.springframework.webflow.executor.flowexecutorimpl.resumeexecution(flowexecutorimpl.java:169) @ org.springframework.webflow.mvc.servlet.flowhandleradapter.handle(flowhandleradapter.java:228) @ org.springframework.faces.webflow.jsfflowhandleradapter.handle(jsfflowhandleradapter.java:57) @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:919) @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:851) @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:953) @ org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:855) @ javax.servlet.http.httpservlet.service(httpservlet.java:595) @ org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:829) @ javax.servlet.http.httpservlet.service(httpservlet.java:668) @ com.ibm.ws.webcontainer.servlet.servletwrapper.service(servletwrapper.java:1230) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:779) @ com.ibm.ws.webcontainer.servlet.servletwrapper.handlerequest(servletwrapper.java:478) @ com.ibm.ws.webcontainer.servlet.servletwrapperimpl.handlerequest(servletwrapperimpl.java:178) @ com.ibm.ws.webcontainer.filter.webappfilterchain.invoketarget(webappfilterchain.java:136) @ com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter(webappfilterchain.java:97) @ com.pcmsgroup.v21.web.config.authfilter.dofilter(authfilter.java:46) @ com.ibm.ws.webcontainer.filter.filterinstancewrapper.dofilter(filterinstancewrapper.java:195) @ com.ibm.ws.webcontainer.filter.webappfilterchain.dofilter(webappfilterchain.java:91) @ com.ibm.ws.webcontainer.filter.webappfiltermanager.dofilter(webappfiltermanager.java:964) @ com.ibm.ws.webcontainer.filter.webappfiltermanager.invokefilters(webappfiltermanager.java:1104) @ com.ibm.ws.webcontainer.servlet.cacheservletwrapper.handlerequest(cacheservletwrapper.java:87) @ com.ibm.ws.webcontainer.webcontainer.handlerequest(webcontainer.java:914) @ com.ibm.ws.webcontainer.wswebcontainer.handlerequest(wswebcontainer.java:1662) @ com.ibm.ws.webcontainer.channel.wcchannellink.ready(wcchannellink.java:200) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.handlediscrimination(httpinboundlink.java:463) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.handlenewrequest(httpinboundlink.java:530) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.processrequest(httpinboundlink.java:316) @ com.ibm.ws.http.channel.inbound.impl.httpinboundlink.ready(httpinboundlink.java:287) @ com.ibm.ws.tcp.channel.impl.newconnectioninitialreadcallback.sendtodiscriminators(newconnectioninitialreadcallback.java:214) @ com.ibm.ws.tcp.channel.impl.newconnectioninitialreadcallback.complete(newconnectioninitialreadcallback.java:113) @ com.ibm.ws.tcp.channel.impl.aioreadcompletionlistener.futurecompleted(aioreadcompletionlistener.java:175) @ com.ibm.io.async.abstractasyncfuture.invokecallback(abstractasyncfuture.java:217) @ com.ibm.io.async.asyncchannelfuture.firecompletionactions(asyncchannelfuture.java:161) @ com.ibm.io.async.asyncfuture.completed(asyncfuture.java:138) @ com.ibm.io.async.resulthandler.complete(resulthandler.java:204) @ com.ibm.io.async.resulthandler.runeventprocessingloop(resulthandler.java:775) @ com.ibm.io.async.resulthandler$2.run(resulthandler.java:905) @ com.ibm.ws.util.threadpool$worker.run(threadpool.java:1865)
it seems websphere wrongly interpreting controllerlookup.get
property, whereas tomcat correctly interprets method.
any ideas why tomcat , websphere interpreting el differently? or how fix it?
i've come workaround seems work far.
i've changed signature of look-up method called getcontroller
without parameters. instead, obtains config object spring's flow scope:
public allocationscontroller getcontroller() { allocationconfig config = (allocationconfig) requestcontextholder.getrequestcontext().getflowscope().get("allocationconfig"); // determine concrete type of controller depending on config, , return it. }
and in tag autocomplete
input:
<p:autocomplete completemethod="#{controllerlookup.controller.searchforstore}" ... />
Comments
Post a Comment