cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Messages to the user

Former Member
0 Kudos

Hi,

1. I have created one webDynpro application in which in default view I am using a tabStrip which contains 4 tabs.

2. 4 different view are associated with these 4tabs.

3. I am using messageArea UIElement in each view.

4. But if I try to display any message using wdComponentApi.getMessageManager().reportSuccess(), it displays the same message in each view.

5. So if I navigate through the tabs, it shows me same message in each & every view.

6. I don't want to display the same message in another views.

How to resolve this problem?

Thanks in Advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can make the visibility property of the messageArea UI to NONE in the three views while navigating through the tabs. Make it visible only for the active tab.

This will solve your problem.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi,

Thanks for the reply. I tried that also. But then it does not show the messages even if I am setting visibility property to the respective message area.

Former Member
0 Kudos

Hi,

Why do you need seperate messageArea UI? You can have one messageArea UI at some place in the view having the tabs. As the messages are generated while navigating through tabs, messageArea will show the message specific to the tab.

thanks & regards,

Manoj

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Is your problem solved? If not then feel free for further queries.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi Nilesh,

Put ur Message Area UI to the top of the Tabstrip UI in the Outline Pane (where u design ur views), your problem will be solved.

Regards / Guru

former_member485701
Active Participant
0 Kudos

Hi Nilesh

If you are maintaining all the messages in message pool, then in following manner you can achieve the target.

IWDMessageManager msgManager = wdComponentAPI.getMessageManager();

if( msgManager.contains(IMessageAComp.Key)){

msgManager.removeMessage(IMessageAComp.Key);

}

And if you are not storing the messages in message pool then you have to hide the message Area in respective views.

Feel free to contact for queries.

Regards,

Praveen

Former Member
0 Kudos

Hi,

Thanks for reply.

I don't have msgManager.removeMessage() method.

I am using NWDS version 7.0.9 .

Former Member
0 Kudos

To display an error message:

wdComponentAPI.getMessageManager().reportException("Your Error Message", false);

To display an warning message:

wdComponentAPI.getMessageManager().reportWarning("Your warning Message");

To display an success message:

wdComponentAPI.getMessageManager().reportSuccess("Your success Message");

This works in an iview other than do modify view.

if you are using another Java file, you need to pass

com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI

from your iview to use this messages in your application in that file.

Thanks & Regards,

Mohak