Saturday, 15 June 2013

Need to submit form twice in dev environment in one spring webflow view state -



Need to submit form twice in dev environment in one spring webflow view state -

on our development environment have couple of webflow view states event not recognised (even though posted server - check via http fox) on first button submit. when press button sec time on jsp event recognised , processing works ok. have 40 events in 8 flows (including 3 sub flows) , occurs on 2 view states in 1 sub flow!

now in our external test environments not occur. understand why occuring in our dev environment

in test have apache - weblogic (but works ok straight weblogic). runs in linux

in dev have tomcat within ide , weblogic using war file. both have problem.

we have extended flowexecutionlisteneradapter list web flow engine on submit. on initial submits requestsubmitted not eventsignaled (this occurs on sec submit)

web flow configuration: http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

<var name="primarycontact" class=".model.domain.contacts.primarycontact" /> <var name="selectprimarycontactaccounts" class="project.web.formbean.selectprimarycontactaccounts" /> <input name="subflowinput" required="true" type="project.web.formbean.contactmanagement.selectaccountsforprimarycontactsubflowinput" /> <on-start> <set name="primarycontact" value="subflowinput.primarycontact"></set> <evaluate expression="selectaccountsforprimarycontactsubflowhandler.findprimarycontactlu(subflowinput.sacorlesearchstate, subflowinput.primarycontact)" result="flowscope.primarycontacts"/> <evaluate expression="subflowinput.sacorlesearchstate.extractowningcustomer()" result="flowscope.owningcustomerorlegalentityid" /> </on-start> <view-state id="selectaccountsform" view="agent.contactmanagement.selectaccountsforprimarycontact.selectaccounts" model="selectprimarycontactaccounts"> <on-render> <evaluate expression="selectaccountsforprimarycontactsubflowhandler.getaccountsystemreferencedata()" result="requestscope.accountsystems"/> <set name="flowscope.hassearched" value="false" type="boolean" /> </on-render> <transition on="searchsourcesystem" to="selectaccountsformsourcesystemsearched" /> </view-state> <view-state id="selectaccountsformsourcesystemsearched" view="agent.contactmanagement.selectaccountsforprimarycontact.selectaccounts" model="selectprimarycontactaccounts"> <on-render> <evaluate expression="selectaccountsforprimarycontactsubflowhandler.getaccountsystemreferencedata()" result="requestscope.accountsystems"/> <evaluate expression="selectaccountsforprimarycontactsubflowhandler.findprimarycontactaccountassociationsforaccountsystem(primarycontact, selectprimarycontactaccounts, owningcustomerorlegalentityid)" result="requestscope.primarycontactassociations"/> <set name="flowscope.hassearched" value="true" type="boolean"/> </on-render> <transition on="save" to="accountsselected"/> </view-state> < <end-state id="accountsselected" > <output name="selectprimarycontactaccounts" value="selectprimarycontactaccounts" type="project.web.formbean.selectprimarycontactaccounts" /> </end-state> <end-state id="cancelselection" /> <global-transitions> <transition on="back" to="cancelselection"> </transition> </global-transitions> </flow>

public class cdflowexecutionlistener extends flowexecutionlisteneradapter {

@override`enter code here` public void stateentered(requestcontext context, statedefinition previousstate, statedefinition newstate) { // log using in house framework } @override public void eventsignaled(requestcontext context, event event) { // log using in house framework } @override public void requestsubmitted(requestcontext context) { // log using in house framework } @override public void transitionexecuting(requestcontext context, transitiondefinition transition) { // log using in house framework } @override public void exceptionthrown(requestcontext context, flowexecutionexception exception) { // log using in house framework } }

spring-webflow-2

No comments:

Post a Comment