on 07-29-2009 2:25 PM
Hi,
I want to create error message while user enter symbols into input field.
Plz help me with the procedure to create messages.
Regards,
Anitha
hi
check the Ascii code of the symbols which you want to restrict in the input field ,
put a if condition from so and so Ascii value , write a error message based onthat .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
follow this procedure,
declare the error or warning or text messages in the message pool.
we can use those message in the view using the message manager .
IWDMessageManager messageMgr = wdComponentAPI.getMessageManager();
and check if the input field or any other ui element is null then throw error messages.
if(wdContext.currentContextElement.getfieldName()==null){
messageMgr.reportContextAttributeMessage(wdContext.currentContextElement(),attributeInfo,IMessageSimpleComp.EMAIL,null,true);
here email is the required field.
refer this link,
http://help.sap.com/saphelp_nw04/helpdata/en/72/1d6526263ff24995016a152705eab2/frameset.htm
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
Follow the procedure,
1. Open message pool and add a message (i.e. custom message what ever u want) and enter appropriate message key & message type
2. write the following code in the button action function
IWDMessageManager messageMgr = wdComponentAPI.getMessageManager();
if(wdContext.currentContextElement.getfieldName()==null){
messageMgr.reportContextAttributeMessage(
wdContext.currentContextElement(),
attributeInfo,
IMessagecomponentName.MessagePoolKey,
new Object[] { "" },
true);
}
Regards,
srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
Create a Message in Message pool with place holder etc.. in between the message where ever you want to display the dynamic value. Then raise exception from your code using reportException or reportMessage methods of Message Manager ( wdComponentAPI.getMessageManager().reportMessage) by passing the value (typed in input field) as parameter.
Regards
Ramesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.