on 08-20-2007 8:15 AM
public void messid( )
{
//@@begin messid()
msg = wdComponentAPI.getComponent().getMessageManager();
IPublicMessage.IEmpNode node = wdContext.nodeEmp();
IPublicMessage.IEmpElement ele = node.currentEmpElement();
if(ele.getId().length()<3 );
{
msg.raiseMessage(IMessageMessage.MSGID,new Object[]{"id"},true);
msg.reportSuccess("must not be empty");
}
//@@end
}
In the above code to display simple error message, even if i m entering more than 3 digits, it is displaying the error msg.What si the problem????
Hi Pinki,
One quick question.
Are you using a semicolon after the if condition?
<b>if(ele.getId().length()<3 );</b>
{
msg.raiseMessage(IMessageMessage.MSGID,new Object[]{"id"},true);
msg.reportSuccess("must not be empty");
}
If yes, please remove the semicolon and execute your code. Should work.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
10 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.