on 02-11-2007 6:54 AM
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);
}
}
Alka,
This works. thank you. I realise how hard it is for ABAPers to code web dynpro
On the other hand i have an issue. The error message is been dispaled now after i put your code. After the error message is diaplyed i enter the correct values but the navigation is not moving forward. The control is staying in the same screen and not moving forward to review and save screen. I have coded this logic in onEvent of Component controller of the VAC.
Any ideas of FPM and how to get rid of this
regards
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sameer,
You are using
wdComponentAPI.getMessageManager().raiseException("Please enter Telephone Number",true);
The boolean value means "cancelNavigation", so navigation is canceled when errors occur.
If you use
wdComponentAPI.getMessageManager().raiseException("Please enter Telephone Number",false);
The error messages will be displayed also, but navigation will continue.
Johan
Hi Sameer,
Instead of using the condition:
if (subtype == "4")
u should use the string function equalsIgnoreCase or equals ,i.e;
if(subtype.equalsIgnoreCase("4")
{
...
}
Regards,
Alka.
Message was edited by:
Alka Panday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.