on 12-06-2007 9:55 AM
Hi All,
Can any one tell me a solution for this,
I have 10 input fields and one save button in my view. If user enters values in
4 inputfields and press save button then system shoud point to the 5th field without considering the mandatory fields.
Thanks & Regards
Shareena
Hi,
To set focus you can use the following code
IWDInputField inputField = (IWDInputField) view.getElement("<Your UI Element>");
inputField.requestFocus();
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shareena,
Use Message editor & Message format for this. its better if u make the field as required instead of checking values one by one.
Check this for the steps
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/837d9290-0201-0010-1381-e633fe17cb14">Validations</a>
it will automatically take the focus to field.
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create an "error" Message in MessagePool with Key.. Key1
and use this code ti focus
Object attValue=wdContext.currentContextElement().getAttributeValue(IPrivate<ViewName>.IContextElement.<Field5>);
IWDAttributeInfo attInfo=wdContext.getNodeInfo().getAttribute(IPrivate<ViewName>.IContextElement.<Field5>);
if (attValue==null)
{
objMessageManager.reportContextAttributeMessage(wdContext.currentContextElement(),attInfo,IMessage<ComponentName>.KEY1,null,true);
return;
}
Similarly you can check and focus other fields.. Just Replace <Field5> with some other <Field> and IMessage<ComponentName>.<KEY>
Regards
LakshmiNarayana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.