on 10-05-2006 2:17 PM
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
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexander,
Does the issue resolve if you bind a dummy action to the onSelect event of the tabstrip?
Best regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you illustrate your problem in detail. when will you need to enable or disable the message areas?.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.