cancel
Showing results for 
Search instead for 
Did you mean: 

How to Disable message area

Former Member
0 Kudos

Hi ,

I have a message area and i had linked the "Enable" property of the message area to the context attribute , even if i set the Contex attribute to TRUE the message is still disabled , can some one explain me how to disable message area by linking to the context attribute.

Regards,

Ravi.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Try to control property 'visibile'.

Former Member
0 Kudos

Hi,

We do not have any control to delete messages that are raised/reported using IWDMessageManager.

Former Member
0 Kudos

Cant we do the same with Enable property ?? Why is it not working.

Former Member
0 Kudos

Hi,

Have a look at the thread

One way of doing this can be by using TextView UI element.

When ever you have messages to be shown set the message to a context attribute and map this attribute to the TextView.

You can even change the colour of the text displayed

by setting the property semanticColor of the TextView.

create a context attribute of type

com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor and map this to semanticColor property of textview.

before assigning any values to the textview set the attribute value to your desired color from available color.

See if this works for you.

If you face proble in message alingment let me know.

One more way of doing this is using group UI element and adding the MessageArea UI element to this group.

Control the visibility property of the group and not theMessageArea UI element.

Message was edited by:

Shriram Kabra

Former Member
0 Kudos

HI Shriram,

Let me explain my problem . I have two tabs in my tab strip control and each tab has its own message area , but the problem is when 2nd tab is selected and if i raise some exception is doesnt show in the message area of the 2nd tab as it is taking the first tab message area as default , so i had put the following logic in the modifyview.

<b>if(selectedTab.equals("Tab1"))

{

IWDMessageArea Tab2MsgArea =(IWDMessageArea) view.getElement("Tab1MessageArea");

Tab2MsgArea.setEnabled(false);

IWDMessageArea Tab1MsgArea =(IWDMessageArea) view.getElement("Tab1MessageArea");

Tab1MsgArea .setEnabled(true);

}

else

{

IWDMessageArea Tab2MsgArea =(IWDMessageArea) view.getElement("Tab1MessageArea");

Tab2MsgArea.setEnabled(true);

IWDMessageArea Tab1MsgArea =(IWDMessageArea) view.getElement("Tab1MessageArea");

Tab1MsgArea .setEnabled(false);

}</b>

This logic is working fine for most of the cases , but When i selcect a TAB, in the event handler of the selection, i am performing some logic and raising exceptions, for these exceptions it is not working fine as my event handler is fired first before the "WDModifyView" . Is there any other way to control the "ENABLE" property of the MessageAreas.