Skip to Content
avatar image
Former Member

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

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 😔

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 16, 2006 at 04:00 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 14, 2006 at 02:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?!