cancel
Showing results for 
Search instead for 
Did you mean: 

Message isnu00B4t display in messageArea

Former Member
0 Kudos
66

Hi All:

I have a view that is show in the portal. The problem is that instead display the message, just do a refresh but nothing else. Doesn´t show the message.

I put a messageArea and I wrote the following code:

IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();

if (wdContext.currentManModelElement().getImplemDate()== null){

msgMgr.reportException("É necessário prencher o campo Data início da implementação", false);

}

else if (wdContext.currentResponsibleElement()== null){

msgMgr.reportException("É necessário prencher o campo Responsável", false);

}

else{...}

Thanks

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi ,

Before if condition first print the date.

Check what is picking up in Date value.

If date is null then it will enter into the loop.

Thanks

Risha

Former Member
0 Kudos

we also have the same problems after upgrading to SP15. Even with standard ess , error message not output in message area. Do we miss out something . Please help

former_member751941
Active Contributor
0 Kudos

Hi Aida,

Your code is fine for if condition.

IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();

if (wdContext.currentManModelElement().getImplemDate()== null || wdContext.currentManModelElement().getImplemDate().trim().equals(“”)){

msgMgr.reportException("É necessário prencher o campo Data início da implementação", false);
else if(......)
{
}
else
{
}

}

But in else if you are checking == null){

msgMgr.reportException("É necessário prencher o campo Responsável", false);

}

Regards,

Mithu

Former Member
0 Kudos

Hello Aida,

Put MessageArea Control in to View them try this code


if( wdContext.currentManModelElement().getImplemDate().equals( null))
{
  wdComponentAPI.getMessageManager().reportException( "String 1", false);
}else if( wdContext.currentResponsibleElement().equals( null))
{
  wdComponentAPI.getMessageManager().reportException( "String 2", false);
}

This time it has to work

Regards

- Vinod

*

Edited by: Vinod V on Apr 4, 2008 9:51 AM

nikhil_bose
Active Contributor
0 Kudos

Vinod!

Did you try your code actually?

It will give you NPE.

Please don't post wrong code.

nikhil

Edited by: Nikhil Bos on Jun 19, 2008 11:18 AM

Former Member
0 Kudos

Hi,

"The problem is that instead display the message, just do a refresh but nothing else."

What do you mean by refresh here? If it is browser refresh then message will disappear. This is how it works.

thanks & regards,

Manoj

Former Member
0 Kudos

Hi

see the below link ,it will be helpful for u.

[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/webdynpro/wd%20java/wdjava%20archive/a%20simple%20input%20form%20with%20message%20and%20error%20service%20support.pdf|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/webdynpro/wd%20java/wdjava%20archive/a%20simple%20input%20form%20with%20message%20and%20error%20service%20support.pdf]

Regards

Hazrath

former_member485701
Active Participant
0 Kudos

Hi,

Can you try printing the message without any condition?

eg.

msgMgr.reportException("print without condistion");

If it prints the message, then the problem is in your condition.

Regards,

Praveen