Skip to Content
avatar image
Former Member

One message two attributes

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 02, 2008 at 08:56 PM

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

    Cheers,

    ~kranthi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 02, 2008 at 09:42 PM

    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

    Add comment
    10|10000 characters needed characters exceeded