cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying error messages differently

Former Member
0 Kudos

Hi,

I had a form with some mandatory fields. During validations, the error messages are shown on the top once.It shows at the bottom sometimes. How to acheive the similarity? What can be the root cause for this?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Make use of Message Area UI Element

From the doc

MessageArea is a placeholder UI element that indicates where messages (i.e. errors, warnings etc.) should be displayed. The Web Dynpro framework may choose to ignore this hint in favor of e.g. a portal mechanism for displaying messages. Use with care! If there is a suitable MessageArea instance, all messages will be displayed there. Else messages will be displayed with Web Dynpro's default mechanism which might depend on the rendering technology being used. A MessageArea is deemed suitable, if

it belongs to the layout of a view that in turn belongs to the current view assembly;

it's enabled property is neither set to false nor bound, except to a read-only context attribute of value true.

it's visibility is neither set to NONE or BLANK nor bound, except to a read-only context attribute of value VISIBLE.

If there are several suitable instances, the oldest one (with respect to creation time) is used. Note that it's the application developer's responsibility not to place a MessageArea in a view in such a way that MessageArea is not permanently visible, except if the visibility (or enabled) property of the MessageArea is set accordingly. Also beware that the tooltip property might have no effect.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

You could encapsulate your different element (header....) in transparent container and for everyone insert child element MessageArea.

BR

nikhil_bose
Active Contributor
0 Kudos

Use message pool to display static messages. In message pools you can select the type of message that should be shown and can also pass arguments to the messages. i.e. according to a filed or a value comparion error can be shown using this.

You can get this MessagePool by

IMessage<Comp_Name>.YOUR_MESS_ID_IN_POOL

you can raise message by

IWDMessageManager.reportMessage(IWDMessage messageItem, Object[] args, boolean cancelNavigation)

or

IWDMessageManager.reportContextAttributeMessage(IWDNodeElement element, IWDAttributeInfo attribute, IWDMessage messageItem, Object[] args, boolean cancelNavigation)

regards,

nikhil

Former Member
0 Kudos

Hi

The problem that you are facing can be solved using the UI element Message Area. Place this element anywhere in View and later all the Error/ Warning/Success reports will be displayed in this area.

Regards

- Vinod

xxxxxxxxxxxxxxx

Edited by: Armin Reichert on Feb 29, 2008 6:43 PM