on 10-04-2010 10:33 PM
Hi All,
We have many inputfields on the UI , these inputfields are in different tabs of a tabstrip.
We have validation in place .We want to get focus to the respective input field when the message manager complains about some validation.
We are using reportInvalidContextAttributeException method but this doesn't set focus to the inpurfield in a particular tab.
Any inputs ? Does this supports in CE 7.2 ?
Anil
Hi,
use the following code to set the focus on error:
IWDAttributePointer attrField = wdContext().currentContextElement().getAttributePointer("<name of the attribute>");
if(condition)
{
wdComponentAPI().getMessageManager().reportContextAttributeMessage(attrField, IMessage<componentname>().<messageID>, <dynamicParameters>);
}
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This doesn't help.
In our scenario, messageManager displays the error message saying that one of the inputfield is blank.When the user clicks on the message it should set the focus to the respective input field.
setting the focus is not working when the input field is different tab. It works only when the inputfield is in current tab strip
Regards, Anil
Hi,
In that case u will have to print the error message along with the tabname where the Input field is present or use the "Selected Tab" property.
The "Selected Tab" property can bound to a context attribute and depending on which Input field is blank, u can set the selected property to the tab name containing the Input field.
Regards,
Poojith MV
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.