on 06-26-2006 2:10 PM
Hi All,
How to set the cursor in case an error message is poped up.
What is the way and can u suggest me the piece of code.
Regards
Dipendra
Easiest way is through accessing the UIElement and calling requestFocus() method . But i feel best way is doing through context programming !!!
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try with this code. It will point the cursor to the required input field.
IWDNodeInfo nodeInfo = wdContext.getNodeInfo();
IWDAttributeInfo attributeInfo=null;
String fieldLabel = null;
ISimpleType simpleType=null;
IcontextElement contextElement = wdContext.currentContextElement();
IWDMessagemanager manager = wdComponentAPI.getMessageManager();
if(nodeInfo != null){
attributeInfo = nodeInfo.getAttribute("ur context variable - which is mapped to input field");
if(attributeInfo!=null){
simpleType=attributeInfo.getSimpleType();
if(simpleType!=null){
fieldLabel =simpleType.getFieldLabel();
}
}
if (Str(your variable - which you want to check value)==null){
manager.reportContextAttributeMessage(
contextElement,attributeInfo, IMessage XXXX Component.Message,new Object[]{""},true);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.