cancel
Showing results for 
Search instead for 
Did you mean: 

Two MessageArea UI in One View

Former Member
0 Kudos

Hello. !!

My problem is the following one, I have two MessageArea UI (one to the final result, and the other for validacion of input file empty). and I need that these messages appear in two MessageAreaUI different from different location inside the View ¿How I can establish when a this enable and the other desable) since the message always shows it in the first one that find enable.

I need a simple solutions...Regards !!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Antonio,

Error messages are always displayed in the first instance of the Message Area created/loaded in the memory. Even if you disable/hide the message area, it will still show it in the first instance.

A simple solution is to create the message area dynamically at the position you want.

Say you have two Transparent Containers (with id TC4 & TC5)in which you want to these message area depending on your condition.

In your wdDoModifyView do something like this

view.resetView();

if (Condition){

IWDTransparentContainer tc4 = (IWDTransparentContainer)view.getElement("TC4");

IWDMessageArea messageArea = (IWDMessageArea)view.createElement(IWDMessageArea.class, "MessageArea");

tc4.addChild(messageArea);

}

else{

IWDTransparentContainer tc5 = (IWDTransparentContainer)view.getElement("TC5");

IWDMessageArea messageArea = (IWDMessageArea)view.createElement(IWDMessageArea.class, "MessageArea");

tc5.addChild(messageArea);

}

You have to make sure that you view is being reloaded otherwise this will not work since the wdDoModifyView is only called when the view is being loaded/refreshed/reloaded again.

Regards,

Shubham

Answers (1)

Answers (1)

Former Member
0 Kudos

Excellent!

Many Thanks Shubham.