cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the number of messages shown in the current MessageArea

Former Member
0 Kudos

Hi there,

I try to display the messages at the top of the screen in a MessageArea inside a scrollable Container which shows only one message to save space.

In case that there are more than one message I would like to show a hint, that there are more than the displayed message.

Is there an possiblity to get the count of messages shown in the current MessageArea? I already tried to get the MessageArea and had a look at the properties of the object: No Luck

Afterwards I got the MessageManager but there was no apropriate method

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If i am not worng, in messageArea you can set no of maxvisiblemessages property .

So you can set the property to 1 bcose you want to see only 1 message .

If there are more than 1 message then MessageArea automatically creates a table where you can see the total messages count in the table footer.

Regards, Anilkumar

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

Looks like there is no such an API !!! How about implementing on our own

Take a int variable or valueAttribute "count" and increment the count after calling reportwarning or reportsuccess methods on the MessageManager.

This will give count of the exceptions that you are handling in your code.

@All, Correct me if there is such an API exists

Regards, Anilkumar

Message was edited by:

Anilkumar Vippagunta

Former Member
0 Kudos

Thanks for that information. The problem is that I am using the MessageManager in about 50 views in about 5 DCs and it would be an enormous task to find every occurance and to add this counter. Maybe I can ask the actual height of the MessageArea and divide it by the height of a single line (~16px). But how do I get the actual height of that area?!