cancel
Showing results for 
Search instead for 
Did you mean: 

multiple message areas?

Former Member
0 Kudos

Hi All

I have 3 views ebedded in a Tabstrip (one view per tab). what I would like to do is to embed a MessageArea on top of each view. When I do that, messages will be only displayed on the first tab/view, althought the error might occur on the second or third tab/view.

I learnt in this forum that I have to bind a read only context variable to each MessageArea. But how can I handle it to either enable and disable the respective message areas? Where do I have to put my method which either enables and disables the respective message area ?

Can anyone help?

Kind regards

Alex

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

One way to do this would be to use calculated, read-only context attributes for the enabled property of the message areas.

To do this:

1) Define a context attibute to store the view name of the currently enabled message area in the component controller

2) Map this context attribute to each of the view controllers

3) In each view controller, create a calculated, read-only context attribute of type boolean, and bind it to the enabled property of the message area for that view

4) In the calculated get method, disable the message area (return false) unless the current view is the same as the currently enabled message area

5) Each time you need to display a message on one of these views, simply set the context value for the currently enabled message area to the current view

You can avoid the calculated attributes and just map all the read-only attributes for the message areas to each view - and set/clear them all each time - but doing it this way makes it easier if you want to add more views later.

hope this helps...

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Alex,

Check my answer in the following thread.

You need to create the message area dynamically.

Regards,

Shubham

thomas_szcs
Active Contributor
0 Kudos

Hi Alexander,

Does the issue resolve if you bind a dummy action to the onSelect event of the tabstrip?

Best regards,

Thomas

Former Member
0 Kudos

Hi,

Can you illustrate your problem in detail. when will you need to enable or disable the message areas?.