cancel
Showing results for 
Search instead for 
Did you mean: 

IWDDropDownByKey and reportContextAttributeMessage()

Former Member
0 Kudos

Hello all,

We are checking mandatory fields in our WebDynpro application. When a mandatory IWDInputField has no input we use;

IWDMessageManager.reportContextAttributeMessage

to display a message to the user. This works fine.

However, when the mandatory field is an IWDDropDownByKey we do not get the error message displayed to the user.

We are using SP13. Is this a known problem? How can we solve this?

Thanks for your time,

Patrick.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Patrick,

We use here IWDDropDownByKey and reportContextAttributeMessage() without any problems.

But we use SP11.

Please see the following code - it might help you.

****

messageMgr = wdControllerAPI.getComponent().getMessageManager();	

String value = wdContext.nodeFacultyKeyNode().currentFacultyKeyNodeElement().getField();

 IWDAttributeInfo attributeInfo = wdContext.nodeFacultyKeyNode().getNodeInfo().getAttribute("field");   
 
if (value.trim().equals("")){	 			
 messageMgr.reportContextAttributeMessage(wdContext.nodeFacultyKeyNode().currentFacultyKeyNodeElement(),
 attributeInfo,
IMessageOpenUserApp.MISSING_INPUT,
new Object[] { fieldText },
true);	
}

Regards,

Ruthie.

Message was edited by: Armin Reichert (added code tag)

Former Member
0 Kudos

Thanks Ruthie,

I'll be at that site only tomorrow so I'll check your code then and get back to you.

Thanks for your time,

Patrick.

Former Member
0 Kudos

Hi,

I see that that's pretty much the same code as we were using already.

The message still doesn't appear alongside the IWDDropDownByKey UI Element. The exact same code shows the error message for all of our InputFields in the view but simply doesn't display the message for the DropDown. Perhaps it's related to SP13...... it's strange indeed.

We're upgrading to SP14 here tomorrow anyhoos, so I'll check it again next week when I'm here.

Thanks,

Patrick.

Answers (0)