cancel
Showing results for 
Search instead for 
Did you mean: 

How to provide error messages?

Former Member
0 Kudos

Hello,

How do I display error on top or bottom of a page? The error message can be taken from the message pool. The errors are not specific to an inputField the most examples I have seem. Errors can be like, cannot connect to a server, etc.

regards,

arnold

Accepted Solutions (1)

Accepted Solutions (1)

sridhar_k2
Active Contributor
0 Kudos

Arnold,

If you want to display messages (any type) on particular position use MessageArea.

From your code, you just write message it will display in that message area.

It is automatic.

Ex: - wdComponentAPI.getMessageManager().reportException("Server is Down / Exception occured", true);

If you want to take from Message Pool, it is like

String errorMessage = wdComponentAPI.getTextAccessor().getText(IMessageBAPIServiceModel.NAME);

wdComponentAPI.getMessageManager().reportException(errorMessage, true);

//IMessageBAPIServiceModel - is my MessagePool Name

//NAME - is my message

Former Member
0 Kudos

Hello Sridhar,

Thank you for the reply.

Just to clarify, once I use reportException, reportSuccess or reportMessage of the MessageManger, it will automatically be displayed on the MessageArea? No need to call display or execute to have it displayed on the MessageArea?

regards,

arnold

Former Member
0 Kudos

Hmmm, just wondering, were the award points taken out? I can't seem to see the radio buttons for the award points.

Former Member
0 Kudos

HI Arnold

MessageAreaUIElement is used to display the error messages [both user defined and programatic errors]. you can place that UIElement where ever you can on the screen. just move down or move up the element to the desired location. but the point to be noted here is. through out your application MessageAreaUIElement place is fixed. that is where ever you place you UIElement that is fixed.you cannot change the place of element in other views. [it will allow to change but change will not reflect at runtime.]

Best Regards

Chaitanya.A

Answers (0)