cancel
Showing results for 
Search instead for 
Did you mean: 

User two different MessageArea

Former Member
0 Kudos

Hi everybody,

how can i use two different MessageArea. Until now all my error messages from the MessageManager

appear in the first MessageArea. I need two MessageArea because i have different positions

for my error messages.


	IWDMessageManager messageMgr = wdComponentAPI.getMessageManager();	
	messageMgr.reportContextAttributeMessage(	 
		wdContext.nodeVD().currentVDElement(),
		wdContext.nodeVD().getNodeInfo().getAttribute( wdContext.currentVDElement().TARGET_PATH ),
		IMessageVD.IS_FILE_ERROR,
		new Object[] { wdContext.currentVDElement().TARGET_PATH },
		true		
	);		   

regards,

Seed

Edited by: seed_mopo on Sep 25, 2008 1:04 PM

Accepted Solutions (1)

Accepted Solutions (1)

siddharth_jain
Active Contributor
0 Kudos

Hi ,

Try the following approach and see if it works.

create two context value attribute of type boolean and bind the enable property of both the message area to both the context.

in the wdDoInit method set one message area enable property as true,for other keep it false.

Now depending on the error message nature enble the respective Message Area and disable the other one.Before reporting the exception.

make sure that both message areas should not be enable at the same time.

Siddharth

Former Member
0 Kudos

Hi Siddharth,

i just try this way, but it doesn't work.

regards,

seed

vmadhuvarshi_
Contributor
0 Kudos

Seed,

You can have any number of 'MessageArea' elements defined in your view but WD Framework will display messages in First available MessageArea. So, if you use 2 message areas, it is not possible to use them simultaneously.

You must set 'Enabled' property of one message area to 'False' to display messages in Second message area. You can define 2 attributes of type Boolean in your context, bind them to 'Enabled' property of message areas and then use them to switch on and off message areas as per requirement.

I tried this approach and this works.

Hope this helps.

Vishwas.

Answers (1)

Answers (1)

siddharth_jain
Active Contributor
0 Kudos

Hi,

Try setting the Context Attributes ReadOnly Property to true .

Rebuild and deploy the Application.

Check this thread See Ravi's reply:

Siddharth