on 02-12-2017 4:54 PM
Hi Gurus,
I have a requirement which is 'How to show the history of previous searched values in SAPUI5 Input Field'. Example: New SAP Service Marketplace input field.
Note: We already developed a suggested values for Input Field
Thanks in Advance
Hi Veera,
Thank you for valuable reply.
I understand the above suggestions and retrieve the recent searches .xsjs files but could you please explain me what is the variable 'b' and 'g'?
Thank You, Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Kiran,
I just copy pasted the code used in the service market place. Basically they are some variables used there. You dont need to have xsjs service. They could be some entity as well. The bottom line is there 2 endpoints one for recent searches and one for suggestion. Use them based on condition you want and they will work for your scenarios.
Thanks and Regards,
Veera
Hello Kiran,
If you check the code on how this implemented, they have used the same suggest event available in sap.m.Input. Only caveat to that is when to retrieve the history and when to retrieve the suggestions.
This is how the code works
var b = g + "suggestedterms.xsjs";
if (this.m_currentTerm.length === 0) {
b = g + "rec_search.xsjs"
}
As you can see there are 2 services only server
1. suggestedTerms.xsjs - retrieves the suggestions
2. rec_search.xsjs - retrieve the recent searches
Based on length of the text they choose to call one or the other.
You could use the same logic as above
Thanks and Regards,
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.