cancel
Showing results for 
Search instead for 
Did you mean: 

One message two attributes

former_member540174
Participant
0 Kudos

I have a date range that must be populated (From before To Date). I would like to highlight both date fields when reporting the message. HOw do I do this?

Right now my code is....


if (compareResult > 0)
{
    // From Date is After To Date - INVALID
    msgMgr.reportContextAttributeMessage(wdContext.nodeDateRange().getCurrentElement(),wdContext.nodeDateRange().getNodeInfo().getAttribute("FromDate"),
    IMessageAttendTrackGroupReportComp.DATE__ERROR__FROM_AFTER_TO, new Object[] {}, true);
    msgMgr.reportContextAttributeMessage(wdContext.nodeDateRange().getCurrentElement(),wdContext.nodeDateRange().getNodeInfo().getAttribute("ToDate"),
    IMessageAttendTrackGroupReportComp.DATE__ERROR__FROM_AFTER_TO, new Object[] {}, true);

    returnValue = false;
}

which reports the message in the message box twice - not what I want

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There is no possibility to display one error message by highlighting more than one field.

Cheers,

~kranthi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Diane,

Unfortunately you can't report two same messages for context attribute, but see only one.

One of the features of displayed message is that you can click on it and navigate to the errorneous element, e.g. input field.

It is impossible to use one link to navigate to two element simultaneously

But in your case if you are reporting the message "From date is after to date" you may highlight only From date.

Best regards

Ivan Dulko

Edited by: Ivan Dulko on Jun 2, 2008 11:42 PM