on 03-23-2009 7:09 AM
Hi,
I have a input field which should be made mandatory. I have set the state property as required. But i am not getting the required result. Is this the way to do that?
Kindly suggest
Thanks.
Edited by: jyothi beera on Mar 23, 2009 8:11 AM
Yes it should be correct.
However do note that you need to have codings to display the appropriate error message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jyothi,
Setting teh input fields mandatory does not set the manadatory functionality. it will not check for any kind of validation. It will just provide the labels of the input field with the astrick mark in red, which denotes that this is a mandatory field.
Please check the link which Satish has given, you have to write a code to check for the mandatory attributes. In the same link I have mentioned the way to access the attributes of the nodes. You need to check for those attributes which you are setting as mandatory.
After that you can raise a Exception as well to highlight that input field. Please refer to this code snippet to raise the context exception which will make the input field red in which you will put the mandatory check:
wdThis.wdGetAPI().getComponent().getMessageManager().reportContextAttributeMessage(attribute, message, args)
Also refer to these links:
Here I have already mentioned the way to report the context exception.
Thanks and Regards
Pravesh
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 |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.