ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravindra Mandre <raviof...@gmail.com>
Subject Re: Passing error message from groovy to XML screen
Date Thu, 12 Aug 2010 07:41:02 GMT
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 <
Swapnil.Sawant@lntinfotech.com> 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.
>
> ______________________________________________________________________

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message