cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling AutoComplete for InputFields

vdurgarao09
Contributor
0 Kudos

Dear Experts,

    

                  I am trying to enable autocomplete for an inputfield in Webdynpro java 7.3. I have done the below things-

                  Microsoft Internet Explorer: Tools -> Internet Options -> Content -> check Forms

                    1.  Set the history property of the relevant InputField to true.

                    2.  Bind the value property of the InputField to a context attribute.

                    3.  To set the relevant tag for this attribute, enter the following code:

                         wdContext.nodeInvoiceInput().getNodeInfo().getAttribute(IPrivateASNListView.IInvoiceInputElement.ASN_NO).setTag("ASN:No");

                         (I have written this code in DoInit() method of view).

               I have given the Semantic Id for the attribute ASN_NO is ASN:No, i have attached the screenshot for the reference.

After all this still it is not enabling the autocomplete functionality.

Is any other step need to be done to achieve this?

Please give your inputs.

Thanks

Durga Rao




Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
vdurgarao09
Contributor
0 Kudos

Hi Samuli,

               Thanks for your quick response, it is very helpful for me. If i am using direct URL with append the text which you suggested it is working fine. Now i have to incorporate it in portal, so my question is how can i append that text in portal while creating Iview?

I am passing that in attribute 'Application Parameters' but i am getting this error: java.lang.IllegalStateException: Should not add ID twice cellspacing="0".

It need to be set in any other attribute or how it is going to be work?

Please help on this.

Thanks

Durga Rao



Former Member
0 Kudos

Yes, it should be set as an Application Parameter. You could try to set the URL parameters in NWDS, see the attached link for details.

http://help.sap.com/saphelp_nw73ehp1/helpdata/en/4c/23225735285791e10000000a15822b/frameset.htm

Former Member
0 Kudos

One more thing. Are you aware that in recent releases the official supported solution is SuggestedValues? Assuming you restrict what users can input by input help it is similar to history although more entries will be displayed (instead of only those the user has input before).

http://help.sap.com/saphelp_nw73ehp1/helpdata/en/18/d09132a1b67246987b4b12063151b4/frameset.htm

vdurgarao09
Contributor
0 Kudos

Hi Samuli,

               Thanks a lot, it is very helpful for me. I implemented auto suggest also. It is working fine, but i am still facing one issue in autocomplete(history) with Ajax framework in portal. I did below thing:

1.) I created page for the webdynpro java application, and assigned Standard theme for SAP using AJAX framework. (For this it is not working properly, means  it is not displaying in proper place, i have attached the screenshot).

Portal Desktop = pcd:portal_content/every_user/general/defaultAjaxframeworkContent/com.sap.portal.afpDesktop

2.) If I apply Standard theme for SAP using Classical Framework. Then it is working fine.

Portal Desktop = pcd:portal_content/every_user/general/defaultDesktop

Is any solution available for AJAX Framework so that i can use it and it will display in proper place?

Thanks

Durga Rao

Former Member
0 Kudos

I don't think so since you are forcing HtmlClient. The default for recent Web Dynpro Java is AjaxClient which works together with the Ajax Framework but apparently not too well with the Classic Framework.

vdurgarao09
Contributor
0 Kudos

Hi Samuli,

               Can we reduce the length of inputfield (Size of input area in view) which has SuggestValues 'true'?

Because when i make this property true, it is automatically taking default length 20, even i make it 10 also.

How can i reduce the size of input area?

Thanks

Durga Rao

Former Member
0 Kudos

What is the size of the bound data element? I can't currently develop and deploy WDJ applications, I have no way to check. The other aspect is that there is size limitation for the dropdown (for it to be rendered correctly), but I'm sure it's less than 20.

vdurgarao09
Contributor
0 Kudos

Thank you so much Samuli for the support..... I am able to reduce the size using width property in px.

Thanks

Durga Rao

vdurgarao09
Contributor
0 Kudos

Please help on below question:

http://scn.sap.com/thread/3361564

Answers (0)