cancel
Showing results for 
Search instead for 
Did you mean: 

MessageArea in the bottom of the screen

Former Member
0 Kudos

Hi,

I have a webdynpro application which is implements GPInterface. By default the error messages using IWDMessageManager are displayed in the top of the application.

I have a requirement where i want to display the error messages both in the top and bottom.

How can this be achieved.

I tried to create the MessageArea dynamically but this is not working as i am not able to disable or change the visible property of the default one.

Thanks

Padmaja

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi,

Inser MessageArea UI element in the view.

Regards

Shanmukha Rao

Former Member
0 Kudos

Hi,

Create Message Area UI at the top and at the bottom u can create a textview and display the error messages in that area. In this way error message will be displayed both at the top and bottom.

Please do not make an attempt to show the message in a new pop -up as although you create a

message area in the new view, the error message will be displayed in the parent window itself.

Thanks

Ritushree

Edited by: Ritushree Saha on Mar 16, 2009 11:05 AM

Former Member
0 Kudos

Hi Ritushree,

Well i dont have any doubt with the approach you suggested that it will display the message at both the places. But how using the textview will differentiate the messages whether the message is a Success, error or a warning message. It will simply display the message in text format without any message icon.

Please let me know if i am wrong.

thanks & regards,

Manoj.

Former Member
0 Kudos

Hi Padmaja,

Reading this post what I understand is that, you need is to display the message on the screen and get the user notice to that particular message independent of where the user focus is.

For this purpose, another approach can be use of requestFocus() method available for each UI element.

What can be done is,

1. Define a static boolean variable, eg: g_dispMsg for the view in the global definition part.

2. Wherever (action, method) you display the message, make this static variable to true

g_dispMsg = true;

3. In wDoModifyView, put the code as :

if(!firstTime && g_dispMsg)
  {
     IWDMessageArea msga = (IWDMessageArea) view.getElement("ID_of_MessageAreaUI");
     msga.requestFocus();
     g_dispMsg = false;
  }

I would like to mention that use of Static variables in Modify View Method is not much recommended. But can be used if the view does not have much of operations.

Hope it helps.

Regards,

Alka.

siddharth_jain
Active Contributor
0 Kudos

Hi,

Check this :

Siddharth

former_member185086
Active Contributor
0 Kudos

Hi

You can get message in either of the places not at top and bottom.

No need of dynamic creation of this UI Element and defining the properties of this .

In other words : It presence only will take care of the all messages only this is define its place in window (and that should be one only)

Read this for further help

The MessageArea UI element is a placeholder that specifies where messages, such as error messages or warnings, should appear in the view.

If there is a suitable MessageArea instance, all messages appear in it. Otherwise, the messages appear in a separate window that is similar to a status bar and appears at the bottom of the screen. You can use a MessageArea instance if it belongs to the layout of the associated view.

You cannot set the enabled property to false and can only bind this property to a read-only context attribute of type boolean with the value true. 

You cannot set the visible property to none or blank and can only bind this property to a read-only context attribute of type com.sap.ide.webdynpro.uielementdefinitions.Visibility with the value u201CVISIBLEu201C.



If there is more than one suitable IWDMessageArea instance, the first instance created is used

Under certain circumstances, the Web Dynpro Framework changes the position specification of the MessageArea UI elements, if other targets have priority, for example, portal mechanisms for displaying error messages. 

If you want the MessageArea UI element to be visible, make sure that the view that contains the UI element is also visible, that is, that the visibility of the view and the UI element match. 

The tooltip property does not affect the appearance of the UI element.

Best Regards

Satish Kumar

Former Member
0 Kudos

Hi Sathish,

So is it possible that i create a popup and show the error messages in the popup.

If so how can i pass the error messages to the popup? I open a model window and in the wdDoInit method i write the below statement. It throws of an error on message Manager.

wdComponentAPI.getMessageManager().raisePendingException();

Please help

Thanks

Padmaja

former_member185086
Active Contributor
0 Kudos

Hi

If u define the Message Area UI Element in View and open the popup window then message will display in both the places . So better catch the message in any context attribute and pass it to popup message Use Text View UI element in Popup window.

But dont follow this(above) advice because

But no need to do any thing like this for message and this is not best practice to display some information in additional window which is related to view operation (User will get notification it should be the concern rather than where to display,pop up window has some special uses like some transaction,help ,fileupload ,confirmation etc ) .

Even if this apps is going to integrate in GP ,message area will be same where u will define it.

Best Regards

Satish Kumar

Former Member
0 Kudos

Hi,

In the Design time you place a MessageArea UI Element at the top and bottom of the Webdynpro page.

Create a context element of type uielementDefinitions.visibility.Bind this element to the visible property of the MessageArea UI Element. By default it will be visible. So in ur code dynamically you can change the visibility using the below code

wdContext.currentContextElement().setXX(WDVisibility.VISIBLE);

Regards,

Gayathri.

Former Member
0 Kudos

Hi,

Create two MessageArea UI elements one in the top and other in the bottom.

Former Member
0 Kudos

Hi,

Creating two message area does not work as only one message area is active or enabled at a point of time

Thanks

Padmaja

Former Member
0 Kudos

Hi

Insert MessageArea UI element RootContainer of the view top and bottom, middle contaims all the UI elements.

Rgads

-SS