on 06-10-2009 11:31 AM
hi experts,
in wdDoModifyView i write request focus for input field but when i entering the page, at the first time i can see the focus and after that the focus is disappear. i don't know why and im not doing anything. and when i pressed enter button the page is refreshed
there is my code for setting request focus:
public static void wdDoModifyView(IPrivatePmPartsReplaceTableView wdThis, IPrivatePmPartsReplaceTableView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
// wdThis.wdGetAPI().requestFocus(wdThis.wdGetGetEqpGroupByIdAction());
IWDInputField input = (IWDInputField)view.getElement("EqpId");//Id of Input Field
input.requestFocus();
anyone have this experience?? please help me...
thanks
Edited by: y_ngalam on Jun 10, 2009 12:34 PM
If you have an action assigned to the onEnter action of the input field you can handle the problem there
Make another call to the request focus inside that action.
the request focus this time its over the context element
IWDAttributeInfo attribute = wdContext.nodeSearchInput().getNodeInfo()
.getAttribute(IPrivateSearchSDCompView.ISearchInputElement.SEARCH_INPUT);
wdThis.wdGetAPI().requestFocus(wdContext.currentSearchInputElement(), attribute);
Edited by: Jean Carlo Abreu on Jun 10, 2009 12:47 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thats becouse of you are seting focus for request once the request is over the focus will be gone you need to set it for application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The code in the wdDoModifyView() executes whenever server round trip happens. Initially while loading the application it will be executed so focus (cursor) coming to your input field. Now if you click on some where else in the screen then automatically you will loose the focus on inputfield. If you click on some button (or any action) if some server round trip happens again wdDoModifyView() will be executed and your inputfield gets the focus again.
Regards,
Charan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.