cancel
Showing results for 
Search instead for 
Did you mean: 

msgmanager.reportContextAttributeMessage not working?

Former Member
0 Kudos

hi @,

IN my application I am checking the availablitiy of mandatory field and then using msgmanager.reportContextAttributeMessage to throw message and the cancelnavigation.

This is not working. Program is entering the loop for this condition I checked by putting reportsuccess after thses statements inside block beofre tht its cancelnavigation but still program is flowing wihtout error?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

siddharth_jain
Active Contributor
0 Kudos

Hi,

Try putting msgmanager.raisePendingException() after msgmanager.reportContextAttributeMessage and see if it works.

Regards,

Siddharth

Former Member
0 Kudos

Hi,

raisePendingExceptions is depracated method in CE 7.1 SR5.

And cancelnavigation cancels all the further processing and this is working fine in another application which I have created so dont dont know y this is happening.

Thanks for yr response I used yr idea once and now commented its and its working fine

Regards

Regards

Edited by: BeyondThe obvious on Sep 24, 2008 3:03 PM

Answers (1)

Answers (1)

former_member197348
Active Contributor
0 Kudos

Hi,

cancelnavigation = true does not stop the flow of execution. It just stops navigation flow from one view to another view

If you want to stop the flow of execution use


{
msgmanager.reportContextAttributeMessage(...,true);
return;
}

For CE 7.1

reportContextAttributeMessage(IWDNodeElement element, IWDAttributeInfo attribute, 
IWDMessage messageItem, Object[] args, boolean cancelNavigation)

is deprecated. So you can use this


reportContextAttributeMessage(IWDAttributePointer attribute, 
IWDMessage message, Object[] args);
return;

to stop flow of execution

Regards,

Siva

Edited by: Siva Rama Krushna on Sep 24, 2008 6:27 PM