on 02-15-2010 7:38 AM
Dear Experts,
I have a strange problem. I have an input field which i have set state="required" to make it mandatory. However it does not work.
I have not ticked "without Validation" in the action as well so ideally there shouldn't be a reason why it doesnt work. Have i missed something?
thanks and regards
dilanke
Hi Friend,
Check the label for property of the Label for your input field it might have blank. If so make it input field and revert back.
Regards
Jeetendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dilanke,
Setting that property to required does not provide you a validation check once you submit the form. You have to manually code the validation check in the submit action. Basically, what that does is it puts the * notation to the label indicating that it's required on the UI level. There is no way that field knows which 'submit' or 'action' it is for the UI framework to perform the validation.
Regards,
Jan
Hi friend,
For IWDMessageManager you can use following code after validation
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
msgMgr.reportContextAttributeMessage(wdContext
.currentNodeElement().getAttributePointer(
"<AttributeName>"),
IMessagePackScopingComp.<MessageKey>,
new Object[] { "<InputFieldName>" });
Hope it helps.
Regards
Jeetendra
Hi dilanke
Property state="required" is responsible for displaying the red asterisk only. You have to validate the field by yourself in code. Just check the value is not empty and report the corresponding message using IWDMessageManager.
BR, Siarhei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.