Hi all,
I'm sorry for the somewhat trivial question, but I cannot find a way to set the (success) result message in a minilang service so that it is shown in screen. I've tried with something like this: <set value="Thanks for running this service" field="successMessage"/> But it doesn't work... Any hints? Thanks Jacopo |
Hi Jacopo,
I am not sure but you can try this example as a reference (I used it long time back...so its just a hint): <property-to-field resource="AccountingUiLabels" property="AccountingEmailScheduledToSend" field-name="successMessage"/> Regards Ashish Vijaywargiya --- Jacopo Cappellato <[hidden email]> wrote: > Hi all, > > I'm sorry for the somewhat trivial question, but I > cannot find a way to > set the (success) result message in a minilang > service so that it is > shown in screen. > I've tried with something like this: > > <set value="Thanks for running this service" > field="successMessage"/> > > But it doesn't work... > Any hints? > > Thanks > > Jacopo > ____________________________________________________________________________________ Want to start your own business? Learn how on Yahoo! Small Business (http://smallbusiness.yahoo.com) |
Administrator
|
Jacopo,
Your service is used in an event ? In this case field should be "_event_message_" My 2 cts ;o) Jacques ----- Original Message ----- From: "Ashish Vijaywargiya" <[hidden email]> To: <[hidden email]> Sent: Tuesday, October 31, 2006 12:56 PM Subject: Re: How to set the (success) result message in a minilang service so that it is shown in screen? > Hi Jacopo, > > I am not sure but you can try this example as a > reference (I used it long time back...so its just a > hint): > > <property-to-field resource="AccountingUiLabels" > property="AccountingEmailScheduledToSend" > field-name="successMessage"/> > > > Regards > Ashish Vijaywargiya > > --- Jacopo Cappellato <[hidden email]> wrote: > > > Hi all, > > > > I'm sorry for the somewhat trivial question, but I > > cannot find a way to > > set the (success) result message in a minilang > > service so that it is > > shown in screen. > > I've tried with something like this: > > > > <set value="Thanks for running this service" > > field="successMessage"/> > > > > But it doesn't work... > > Any hints? > > > > Thanks > > > > Jacopo > > > > > > > ____________________________________________________________________________________ > Want to start your own business? Learn how on Yahoo! Small Business > (http://smallbusiness.yahoo.com) |
Administrator
|
In reply to this post by Jacopo Cappellato
BTW what is the difference between field and field-name ? field is only used with set isn't ?
I'm not able to do it without errors, but I think than an update of http://incubator.apache.org/ofbiz/docs/minilang.html should even be done before replacing old syntaxes with set. I have read some times ago that an API is of interest only through its documenation ;o) I may help here with some clues Jacques > Jacopo, > > Your service is used in an event ? In this case field should be "_event_message_" > > My 2 cts ;o) > > Jacques > > ----- Original Message ----- > From: "Ashish Vijaywargiya" <[hidden email]> > To: <[hidden email]> > Sent: Tuesday, October 31, 2006 12:56 PM > Subject: Re: How to set the (success) result message in a minilang service so that it is shown in screen? > > > > Hi Jacopo, > > > > I am not sure but you can try this example as a > > reference (I used it long time back...so its just a > > hint): > > > > <property-to-field resource="AccountingUiLabels" > > property="AccountingEmailScheduledToSend" > > field-name="successMessage"/> > > > > > > Regards > > Ashish Vijaywargiya > > > > --- Jacopo Cappellato <[hidden email]> wrote: > > > > > Hi all, > > > > > > I'm sorry for the somewhat trivial question, but I > > > cannot find a way to > > > set the (success) result message in a minilang > > > service so that it is > > > shown in screen. > > > I've tried with something like this: > > > > > > <set value="Thanks for running this service" > > > field="successMessage"/> > > > > > > But it doesn't work... > > > Any hints? > > > > > > Thanks > > > > > > Jacopo > > > > > > > > > > > > > ____________________________________________________________________________________ > > Want to start your own business? Learn how on Yahoo! Small Business > > (http://smallbusiness.yahoo.com) |
In reply to this post by Jacopo Cappellato
I may not understand what you are asking, however if you are using the
success when call a service from the controller, this is just a string that is matched in the request-map so you could use a screen widget to return the message. if you do it the way you show, I think, you would have to have response name="Thanks for running this service" instead of response name="success" another solution is to have a success page similar to the error page. it would then display the return mapped value. last suggest is to use the messages.flt Jacopo Cappellato sent the following on 10/31/2006 3:50 AM: > Hi all, > > I'm sorry for the somewhat trivial question, but I cannot find a way to > set the (success) result message in a minilang service so that it is > shown in screen. > I've tried with something like this: > > <set value="Thanks for running this service" field="successMessage"/> > > But it doesn't work... > Any hints? > > Thanks > > Jacopo > |
In reply to this post by Jacopo Cappellato
First of all,
thanks to all for your help. I think I have found the issue: the service is called as a service-multi event and I've discovered that the service-multi event handler simply ignores the succesMessages (it only considers the error messages). I will propose a patch soon because I think that it could be nice to have both kind of messages in the result... Jacopo Jacopo Cappellato wrote: > Hi all, > > I'm sorry for the somewhat trivial question, but I cannot find a way to > set the (success) result message in a minilang service so that it is > shown in screen. > I've tried with something like this: > > <set value="Thanks for running this service" field="successMessage"/> > > But it doesn't work... > Any hints? > > Thanks > > Jacopo |
Free forum by Nabble | Edit this page |