on 01-29-2008 4:49 AM
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
Hi Jo,
Hope this will help u
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.