Skip to Content
0
Former Member
Jan 17, 2008 at 10:39 AM

Simple Input Form Example

10 Views

Hi all,

I am trying out this example.

[Simple Input Form|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/837d9290-0201-0010-1381-e633fe17cb14]

In the method onActionSave(),

//@@begin onActionSave(ServerEvent)

this.checkMandatory(IPrivateForm.IContextElement.NAME);

A Simple Input Form 25

SAP Online Help

this.checkDateInPast(IPrivateForm.IContextElement.BIRTHDAY);

this.checkDesired(IPrivateForm.IContextElement.E_MAIL_ADDRESS);

wdComponentAPI.getMessageManager().raisePendingException();

wdComponentAPI.getMessageManager().reportSuccess(

"The sample form data was successfully saved!");

It states that if there is any error, raisePendingException() would stop the flow of the codes.

However when i am running the application, the application still calls the reportSuccess method.

What could be wrong here?