cancel
Showing results for 
Search instead for 
Did you mean: 

Highlighting more than one field per message

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Ayyapparaj,

I tried this but this is unfortunatelly no solution for me, becaue if I do this, I`ll see the message as often as I do the reportContextAttributeMessage-Statement.

regards Mathias