Announcement Announcement Module
Collapse
No announcement yet.
Spring WebFlow - java.lang.ClassCastException, For dynamic drop down Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring WebFlow - java.lang.ClassCastException, For dynamic drop down

    Hi,

    I'm trying to populate a dropdown depending on a value selected on another dropdown. In this case when the user selects a value in "Problem" dropdown, all possible resolutions will be filled in the resolution dropdown to the selected problem.

    When an element is selected in the problem dropdown, an event (onchange) is generated which will fetch the resolution list for that selected problem.

    The whole thing works fine when i select by clicking a value from the problem drop down.

    Application throws an the exception ( please refer below) when i select an element in the problem list , and use the mouse wheel to scroll down fast.
    I believe disabling the mouse wheel for the problem drop down
    will solve problem but i'm not quite sure how to do it as spring select tag does not support the onmousewheel event , please help.

    Im using Spring Webflow 2.0.8 only

    Code:
    		<view-state id="TTPage"  view="Treepage" model="TreeFormDO">
    			 <on-entry>
    				<evaluate expression="srttAction.getTTlists(flowRequestContext,tree)" result="flowScope.ttList"/>
    			</on-entry> 
    			<transition on="tt" to="TreePage">
    				<evaluate expression="srttAction.getResolList(flowRequestContext,tree)" result="flowScope.resolList"/>
    			</transition> 
                </view>
    Tree.jsp code
    Code:
    function getLevel1(eventId)
    {
    	
        var formAction = document.ttform.action;
        var myAction = document.createElement('input');
        myAction.setAttribute('name', '_eventId');
        myAction.setAttribute('type', 'hidden');
        myAction.setAttribute('value', eventId);
        document.ttform.appendChild(myAction);
        document.ttform.submit();
        
       
    }
    
    	<tr>
    	<td class="style21" width="25%" ><font color="#FF0000">*  </font>Problem </td>
    		<td <form:select path="ttPc" onchange="getLevel1('tt');stop();isPopulated(this.form)">
    					<option value="Please select">Please select</option>
    					<form:options items="${ttList.probClassList}"/>
    		</form:select></td>
    	</tr>
    	<tr>
    		<td class="style21" width="25%" ><font color="#FF0000">*</font>Resolution </td>
    		<td class="style21" width="75%" align="left"><form:select path="ttRc" onchange="isPopulated(this.form)">
    		<form:option value="Please select" /> 
    		<form:options items="${resolList}"/>
    		</form:select></td>
    	</tr>
    Code:
    cause of ServletException.
    org.springframework.webflow.execution.FlowExecutionException: Exception thrown in state 'TreePage' of flow 'login'
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.wrap(FlowExecutionImpl.java:569)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:263)
    	at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)
    	at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
    	at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174)
    	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3228)
    	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
    	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
    	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
    	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    	at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    java.lang.ClassCastException: [Ljava.lang.String;
    	at org.springframework.web.util.WebUtils.findParameterValue(WebUtils.java:545)
    	at org.springframework.webflow.mvc.view.AbstractMvcView.determineEventId(AbstractMvcView.java:317)
    	at org.springframework.webflow.mvc.view.AbstractMvcView.getEventId(AbstractMvcView.java:282)
    	at org.springframework.webflow.mvc.view.AbstractMvcView.userEventQueued(AbstractMvcView.java:191)
    	at org.springframework.webflow.engine.ViewState.resume(ViewState.java:195)
    	at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
    	at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)
    	at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
    	at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174)
    	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3228)
    	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
    	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
    	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
    	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    	at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Last edited by SilverHawk; Mar 29th, 2010, 09:13 AM. Reason: clarity
Working...
X