on 04-20-2010 2:25 PM
Greetings
In CE 7.1 Webdynpro Java for an application that runs in PieClient I used the below code.
wdThis.wdGetAPI().requestFocus(wdContext.currentHand_Add_MaterialsElement(),
wdcontext.nodeHand_Add_Materials().getNodeInfo().getAttribute(IPrivateMixersView.IHand_Add_MaterialsElement.MATNR));
As soon as an action that throws an error message or information message or warning message using Message Manager is triggered the request focus method doesn't place the cursor in the desired input field.
Kindly help me out.
Tx.
Best Regards
Ramamoorthy D
Hi Durai,
The IWDAttributeInfo is deprecated in CE7.1. use can try following code:
//For Node Validations
IWDAttributePointer <Object>= wdContext.node<NodeName>().get<NodeName>ElementAt(i).getAttributePointer("<Attribute>");
//For Attributes
IWDAttributePointer <Object>= wdContext.currentContextElement().getAttributePointer("<Attribute>");
messageManager.reportContextAttributeMessage(<Object>,<message>,<args>);
Hope this helps u.
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.
Hi,
I tried following code in one of my application and its working fine. Please check if its helpfull.
In wdDoModifyView method write the code below:-
IWDInputField InputField = (IWDInputField) view.getElement("if_Name");
InputField.requestFocus();
Regards,
Swati Gaur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Swati
I tried what you have given, as soon as error messages display the cursor navigation is lost from the screen. I need to point the mouse manually to enter information. The application is used in handheld, to use pointer in touch screen seems to be very difficult for the end users.
Tx again for your valuable reply.
Best Regards
Ramamoorthy D
Hi Durai,
try using the reportContextAttributeMessage() API for acheiving what u want:
Eg:
IWDAttributeIfo object = wdContext.currentContextElement().getNodeInfo().getAttribute("<Attribute to set focus>");
if(<condition>)
{
---<messageManagerObject>.reportContextAttributeMessage(<attributeInfoObject>,<message>,<parameters>,<cancelNavigation>);
}
Hope this helps you.
Regards,
Poojith MV
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.