Skip to Content
0
Former Member
Dec 31, 2007 at 08:38 AM

Report Context attribute message

54 Views

Hi all,

I am not able to resolve the error in below code(Error in bold)

"messageMgr.reportContextAttributeMessage(

wdContext.currentDetailElement(),

attributeInfo,

IMessageForm.MISSING_INPUT,

new Object[] ,

true);"

I inculded message key in message pool as "MissingInput" but it is not displaying in IMessageForm.

I am using NW2004 is there any thing related with the version.

My code is below.

IWDMessageManager messageMgr = wdComponentAPI.getMessageManager();

Object attributeValue =

wdContext.currentDetailElement().getAttributeValue(fieldName);

IWDAttributeInfo attributeInfo =

wdContext.nodeDetail().getNodeInfo().getAttribute(fieldName);

if (((String) attributeValue).length() == 0) {

messageMgr.reportContextAttributeMessage(

wdContext.currentDetailElement(),

attributeInfo,

IMessageForm.MISSING_INPUT,

new Object[] { fieldLabel },

true);

}

}

Thanks&Regards,

HB.