Hello swapnil , you can give a try to this by the following : <event type="bsf" invoke="component://Path of your groovy file"/> <response name="success" type="view" value="valueName"/> <response name="error" type="view" value="valueName"/>
based on the return from groovy file which may be success or error , you can provide the view . HTH Regards Ravindra Mandre On Thu, Aug 12, 2010 at 3:17 PM, Swapnil Sawant < [email protected]> wrote: > Hi Ravindra, > > Thanks for your reply. > > I want to set the error message while processing in groovy and then display > that error message on XML corresponding to " <response name="failure" > type="view" value="errorpage"/>" > > If you have any such code, could you pl paste it here. It would be of great > help to us. > > > > Thanks & Regards, > Swapnil Sawant | iLabs | L & T Infotech > > Plot no. EL - 200,TTC Electronic Zone,Shil-Mahape road,Navi Mumbai - 400 > 701 > Extn: +91 22 6795 4325 > Mail: [email protected] > > www.lntinfotech.com > > > -----Original Message----- > From: Ravindra Mandre [mailto:[email protected]] > Sent: Thursday, August 12, 2010 1:11 PM > To: [email protected] > Subject: Re: Passing error message from groovy to XML screen > > Hello Swapnil, > In groovy you can show error message by setting them in request , as > follows > > request.setAttribute("_ERROR_MESSAGE_", "your custom or standard message > here" ); > > this returns your messge on UI, > > > Regards > Ravindra Mandre > > > > On Thu, Aug 12, 2010 at 11:47 AM, Swapnil Sawant < > [email protected]> wrote: > > > Hi, > > > > I wish to achieve following functionality in ofbiz : > > > > > > - From controller , I am calling a groovy file > > > > - In groovy file, I am checking if data corresponding to request > > parameters from screen is existing in some entity or not > > > > - If data is not preset in that entity, I wish display "error > > message" on the output screen which is mapped to response type "error" > > > > My question here is that how do I pass a message (e.g. "No data for this > > empl id ...") from groovy file to the next xml screen corresponding to > > "error" response > > > > (Similar to as we do in Java service of ofbiz. Using > > ServiceUtil.returnError("type ur msg here") ) > > > > What things I need to write in groovy and XML file ? > > > > > > > > Thanks & Regards, > > Swapnil Sawant > > > > > > ________________________________ > > This Email may contain confidential or privileged information for the > > intended recipient (s) If you are not the intended recipient, please do > not > > use or disseminate the information, notify the sender and delete it from > > your system. > > > > ______________________________________________________________________ > > > ______________________________________________________________________ > > This Email may contain confidential or privileged information for the > intended recipient (s) If you are not the intended recipient, please do not > use or disseminate the information, notify the sender and delete it from > your system. > > ______________________________________________________________________ >
