on 01-14-2008 3:47 PM
Hi,
When I do my validation, I want to highlight more than one input field per validation and message case.
Actual:
=====
For the moment, I do my validation on a field called phone like this:
//phone
if(!wdThis.wdGetEbep_ComponentController().validateRequiredWhole(wdContext.nodeRegistration()
.currentRegistrationElement().getAttributeValue(IPrivateUserRegistration1.IRegistrationElement.PHONE)))
{
IWDAttributeInfo attInfo = wdContext.nodeRegistration().getNodeInfo().getAttribute(IPrivateUserRegistration1.IRegistrationElement.PHONE);
messageMgr.reportContextAttributeMessage(wdContext.currentRegistrationElement(), attInfo, IMessageEbep_Component.VLAIDATION__REQUIRED__FIELD, new Object[] {wdContext.currentLanguageElement().getLbl_Phone() }, true);
}
Now:
====
I enlaged the phone label with a drop down and another input field. Like this: Dropdown:Country Code, Input(phone), Input(phone extension)
One of this three values is not valid, I want to hightlight all three objects but only with one message which even could refer to the phone field, that would be ok for me. So, how is the solution to highlight 3 fields (1 dropdown and 2 input) with one message?
Thanks in advance
Mathias
Hi,
I think you have to specify the different attr info and use the same code what you are using to get the highlighting for more than one field.
Ex:
IWDAttributeInfo attInfo1 = wdContext.nodeRegistration().getNodeInfo().getAttribute(IPrivateUserRegistration1.IRegistrationElement.PHONE);
IWDAttributeInfo attInfo2 = wdContext.nodeRegistration().getNodeInfo().getAttribute(IPrivateUserRegistration1.IRegistrationElement.COUNTRYCODE);
IWDAttributeInfo attInfo3 = wdContext.nodeRegistration().getNodeInfo().getAttribute(IPrivateUserRegistration1.IRegistrationElement.EXTENSION);
messageMgr.reportContextAttributeMessage(wdContext.currentRegistrationElement(), attInfo1, IMessageEbep_Component.VLAIDATION__REQUIRED__FIELD, new Object[] {wdContext.currentLanguageElement().getLbl_Phone() }, true);
repeat the above statement with different attribute infos declared above.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.