on 09-05-2006 7:17 PM
Hi
I create view and assigned UI elements to context attributes.i want to validate the entered input before values are getting stored in context node.Currently as part of the project,there is an input field where user supposed to enter the integer as input.but if he enter'%" charecter and clicks on save button,i am getting error called "Page Cannot be displayed error".so i wanted to check the input values before storing in the context.is there any better solution?please help
Prasad
Hello
If you have followed the above link, then its well and good.
I ll try to simpify it. Follow these steps
1. In the message pool of your DC/project declare a Message Key 'Missing_Input' having Message Type 'error', Message Text 'Please enter the '.
2. In the action handler of your 'Save' button write the following code
String name = wdContext.<get the value>;
if(null == name || "".equals(name ) || "0000000000".equals(name ) || name .length() <= 0)
{
IWDAttributeInfo nameInfo = wdContext.node<name>().getNodeInfo().getAttribute("<attribute name>");
msgMgr.reportContextAttributeMessage(wdContext.current<node name>Element(),nameInfo ,IMessage<ComponentName>Component.MISSING__INPUT,new Object[] { "<Name of attribute>" }, true);
}
Try this. I hope it helps you.
Regards
Kapil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasad,
Best regards, Maksim Rashchynski.
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.