on 2008 Apr 03 8:29 PM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.