Re :Re: how is the response identified

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re :Re: how is the response identified

puranisank
Thanks Chris. I could understand very [hidden email] wroteA java method returns what ever type of data isdeclared in the method declaration (public staticString - for instance). When it\'s a type String themethod by default returns \"success\" upon completion. However, you can have it return whatever string youwish by having at any breakpoint return\"yourStringHere\".In the java method CheckoutEvents.finalizeOrderEntrythat is being called by the request \"finalizeOrder\",there are several breakpoints that if reached willreturn the string specified.In CheckoutEvents.java, the following are returned atdifferent breakpointsline 655: \"customer\"line 765: \"error\"line 779: \"error\"line 796: \"error\"line 835: \"customer\"line 839: \"shipping\"line 843: \"options\"line 847: \"term\"line 850: \"payment\"line 854: \"addparty\"line 858: \"paysplit\"line 864: variable checkoutGoToline 868: \"sales\"line 870: \"po\"which ever one gets hit first is what
 will be returnedto the request. If one of those matches a responsename it will do what that response says (run anotherrequest, go to a view, etc)--- [hidden email] wrote:> How is the response identified by the request> handler when one request-map contains several view> responses?Example :> > >  > \" <request-map uri=\"finalizeOrder\">> >        > <security https=\"true\" auth=\"true\"/>> >         <event> type=\"java\"> path=\"org.ofbiz.order.shoppingcart.CheckOutEvents\"> invoke=\"finalizeOrderEntry\"/>> >        > <response name=\"addparty\" type=\"view\"> value=\"setAdditionalParty\"/>> >        > <response name=\"customer\" type=\"view\"> value=\"custsetting\"/>> >        > &l
 t;response name=\"shipping\" type=\"view\"> value=\"shipsetting\"/>> >        > <response name=\"options\" type=\"view\"> value=\"optionsetting\"/>> >        > <response name=\"payment\" type=\"view\"> value=\"billsetting\"/>> >        > <response name=\"term\" type=\"view\"> value=\"orderTerm\"/>> >        > <response name=\"sales\" type=\"request\"> value=\"calcShipping\"/>> >        > <response name=\"po\" type=\"view\"> value=\"confirm\"/>> >        > <response name=\"error\" type=\"request\"> value=\"orderentry\"/>> >     </request-map>\"> > > Thanks and regards > > Purani