Autocomplete has become a standard in modern application, when users are asked to type in inputs. In the example below, I implemented autocomplete functionality into an Xcelsius input text component. Start typing any zip code starting with 0 and hit the enter key to get the all the zip codes that match the starting numbers you typed in. (zip code list sourced from http://www.quine.org/zip-all-00001.html, not all zip codes represented, and accuracy of list is unknown)
To get this to work, I used an ajax technique. The Xcelsius file contains two eic variables, one for the value inserted in the text box, and one for the query results array presented in the spreadsheet component. The html page that embeds the swf contains a javascript functions that listens to changes in the value of the input eic. On change, it makes a call to a php file that uses the user input as part of a sql where clause, and gets the list of matching zip codes from a mySql database.
Since there are no native inpu text components in Xcelsius that write to the model while users type, users still need hit enter; ce la vie. Also, I limit the query results to 100 rows from the database, so you don’t get all 5600 zip codes that start with 0 as you type 0 and hit enter…
Using BusinessObjects native connectivity methods, such as BI Services, QaaWS or Live Office can eliminate the need for the ajax approach and basically trigger connections on change from within Xcelsius. All the source files for this example can be found here. Enjoy!
-
Archives
- October 2021
- June 2020
- June 2017
- March 2017
- September 2016
- June 2016
- February 2016
- November 2015
- July 2015
- May 2015
- March 2015
- January 2015
- September 2014
- August 2014
- July 2014
- June 2014
- March 2014
- February 2014
- January 2014
- December 2013
- October 2013
- August 2013
- July 2013
- June 2013
- April 2013
- March 2013
- February 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
-
Meta
Ahhh, just found the free component on Centigon Labs…:)
Great Kalyan! Yes, i got this as far as possible without flex development, the Centigon solution, using a custom component, is a better fit for a “real world” implementation of this feature.
Ron, I didn’t take a look at the XLF, but I’m sure you are using the filtered rows approach. I was able to achieve all of this in a BOBJ environment. However one of the important features of auto complete is to show the list without hitting the “Enter” key. i.e. Show them as you type. Any thoughts?
Hi
I am not able to download the zip file.
thanks
Sreeni, make sure your browser is allowed to download .zip files. The download is for a zip file that includes the .swf, .xlf, .php and .html files needed for this example.