How can i send face message to user interface from operation created on IDE?

Hello!

I have create an operation on IDE and in some case it should send to user interface warning, message as in case of validation forms, i didn't find any way to do that?

Thanks!

1 votes

1 answers

1838 views

ANSWER



I had to do this recently as well – what I did was to use (in Nuxeo Studio) the “User Interface -> Add Message” instruction in the automation chain, checking the response of my custom operation in the expression language to set the severity/message text. E.g.

message:

Packaging request @{Context.input != "" ? "succeeded" : "failed"}. 

severity:

@{Context.input != "" ? "INFO" : "ERROR"}

My operation returns a nonempty string on success, but the above worked for simple booleans too with the correct expression.

If you're not using Nuxeo Studio there's surely a way to do this involving editing XML.

0 votes