Skip to Content
author's profile photo Former Member
Former Member

reportContextAttributeMessage does not highlight field

Hi

I have a node named Params, and I have created the elements under that dynamically. One of the elements created dynamically is "Rating".

I need to check if the input field(created dynamically) mapped to "Rating" is null or not. if it is null, I need to report a message and highlight the field.

I have a validation helper class, that Im calling, with the method:

public static void raiseError(IWDMessageManager messageMgr, IWDMessage message, IWDNodeInfo node, 
IWDNodeElement element, String fieldName, String fieldLabel) 

IWDAttributeInfo attributeInfo = node.getAttribute(fieldName);
messageMgr.reportContextAttributeMessage(element,attributeInfo,message,new Object[] { 
	fieldLabel },true);

I have done everything thats necessary and am calling the validation class raise error with all the attributes as follows:

ValidationHelper.raiseError(messageMgr, IMessageEmployeeRating.MESSAGE, 
wdContext.nodeParams().getNodeInfo(), wdContext.currentParamsElement(), "Rating"+i, "The rating 
has not been entered");

The problem is that the message "The rating has not been entered" is displayed as expected, but the field is not highlighted or outlined red.

What could be wrong?

BTW, Im on EP 7.00 SP 13.

Thanks

OJ

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 05:02 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 05:59 AM

    Hi Jo,

    Please check whether the 'type' of message defined in the Message Pool is 'error' . If you have selected the type as 'standard', the message will be displayed but the input field will not be highlighted. Hope this will help you.

    Regards,

    Shabeer.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2008 at 07:15 AM

    Hi Jo,

    As far as my observations in ur code, when u pass the field name, ur passing it as "Rating"+i. Do u have multiple Rating attributes under ur value node "params"???

    If there is no such attribute, i think i will not point to the attribute to which u have mapped.

    Regards,

    Poojith MV

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Just to make sure that it not a bug in your version , can you try to raise the exception with type WARNING and see weather it comes in Yellow.

      One more thing when the message is displayed on top does that have a red icon in current state??

      Regards

      Ayyapparaj

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 05:05 AM

    Hi,

    What is the code through which you are checking the attribute mapped to inputfield is null or not.

    If you add an element for a node, it will be an empty element and not null.

    thanks & regards,

    Manoj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Manoj

      I am checking if the rating is null or not, and if it is null, it has to display the message.

      I even checked the value of Rating, and it is displayed as null. So thats why it goes into the validation and displays the message "Rating is not entered".

      Any other thoughts?

      Thanks

      OJ

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 05:17 AM

    Hi,

    Your code looks fine then.

    Just check attributeInfo is for the same attribute for which you are checking null.

    And element is the current element.

    thanks & regards,

    Manoj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Manoj

      Yes, the attributeinfo is for the same attribute im checking, and the element is the current element.

      Im still not able to fugure out what the problem is.

      There was a recent upgrade of patches in my system. Do you think this could have caused it? It was working prior to that. I searched for some docs or Notes on it, but found none.

      Thanks.

      Edited by: Jo on Jan 29, 2008 4:58 PM

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.