on 04-18-2006 10:12 AM
Hi can anybody suggest me how to set focus to the input field on loading the jspDyn Page?
Regards,
Joseph
Hi Joseph,
focusedControl can be used.
Check with this link.
http://help.sap.com/saphelp_nw2004s/helpdata/en/1d/2cff40e39ba854e10000000a1550b0/frameset.htm
Eg:
<hbj:inputField
id="myInputField1"
type="String"
invalid="false"
width="310"
value="After editing press <Enter> to submit"
visible="true"
disabled="false"
required="true"
maxlength="30"
size="50">
<%
myFormId.setFocusedControl(InputField inp_field)
%>
</hbj:inputField>
Regards
Harini S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harini,
I used like that ...but it is giving me error.
<hbj:inputField
id="InputSearch"
maxlength="<%=FFOrders.getMaxLength()%>"
type="string">
<%
myFormId.setFocusedControl(InputField Inp_Search);
%>
</hbj:inputField>
ERROR:
Caused by: com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException: /usr/sap/POD/JC30/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/ffservices_forjsp/work/pagelet/_sapportalsjsp_fforders.java:377: ')' expected
myFormId.setFocusedControl(InputField InputSearch);
^
1 error
It seems there is not taglib for focusedcontrol.
Is there any other alternate way?
Regards,
Joseph
Hi Joseph,
The myFomId is the id provided in <form id="myFormId">
Below is the correct code(dont mention "InputField" in parameters of setFocusedControl method )
<hbj:inputField
id="InputSearch"
maxlength="<%=FFOrders.getMaxLength()%>"
type="string">
<%
myFormId.setFocusedControl(InputSearch);
%>
</hbj:inputField>
Hope this will help.
Thanks and regards,
Amol
Hi Joseph,
The error is this.
It is not
myFormId.setFocusedControl(InputField InputSearch);
It should be
myFormId.setFocusedControl(InputSearch);
The classlib itself should work fine.
InputField InputSearch is given in the syntax to just let us know that InputSearch is the id of the inputfield.
Regards
Harini S
User | Count |
---|---|
86 | |
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.