Skip to Content
0
Former Member
Feb 11, 2007 at 06:54 AM

Phone number mandatory in ESS Adress .. code does not work

26 Views

Hi Guys,

I put this code in component controller - Event -- onEvent of WD component vcPerAddressUSDetail. But this code fails to execute. If I remobe the subtype check in the code it works fine for all the sub types. My requirement is to limit the mandatory check only for emergency sibtype which is 4.

Any help

String areacode = null;

String phonenumber = null;

String subtype = null;

subtype = wdContext.currentSubtypesElement().getSubtype();

if (subtype == "4" )

{

areacode = wdContext.currentSelectedInfotypeElement().getAreac();

phonenumber = wdContext.currentSelectedInfotypeElement().getTelnr();

if (phonenumber == null || phonenumber.trim().length() == 0)

{

wdComponentAPI.getMessageManager().raiseException("Please enter Telephone Number",true);

}

}