This project is read-only.

flexbox search with realtime query appender

Jan 31, 2012 at 12:55 PM

Hi

First of all i would like to thank people behind flexbox autocomplete and importantly to mention is pagination within it.

I would be more thank full if some one could help me in solving two issues with this plugin,

results for autocomplete are  displaying but if a letter is typed say "g" it show all the results and highlights the letter "g" in all.Instead i need if a letter is typed in input box, the word starting with that letter should be displayed.

And if one more character is type in text box the drop down list is showing all the results with times appended to number of characters in text box.(that means same results are displayed with how many number of characters typed in text box)

The code i used  is

$('#ffb').flexbox('getdata.jsp', {
        autoCompleteFirstMatch: true,
        noResultsText: 'No results found',
     
        showArrow: false,
        showResults: true,
        maxVisibleRows: 0,
        minChars: 0,
          
    });

case 1 for letter

 

case 2: repeatation of resluts if same letter is typed twice

Jan 31, 2012 at 7:20 PM

Because you are pulling your data from a back-end source (getdata.jsp), the behavior of the query is entirely up to your back-end code.  If you only want to match for strings that start with your query, you can enforce that in your JSP. 

If you are only using client-side filtering, there is a configuration option called "matchAny" (default == true), which you can set to false to only match results that start with your query text.

As for your second question, I'm not sure what you're seeing since the screenshot didn't come through.

Feb 1, 2012 at 5:11 AM
rep.bmp
hi regarding second question results are being repeated the number of times when the new character is typed

Regards,

Sudheer Kosuru

Ph: +91 9739757181


On Wed, Feb 1, 2012 at 12:50 AM, nheldman <notifications@codeplex.com> wrote:

From: nheldman

Because you are pulling your data from a back-end source (getdata.jsp), the behavior of the query is entirely up to your back-end code. If you only want to match for strings that start with your query, you can enforce that in your JSP.

If you are only using client-side filtering, there is a configuration option called "matchAny" (default == true), which you can set to false to only match results that start with your query text.

As for your second question, I'm not sure what you're seeing since the screenshot didn't come through.

Read the full discussion online.

To add a post to this discussion, reply to this email (flexbox@discussions.codeplex.com)

To start a new discussion for this project, email flexbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Feb 1, 2012 at 3:05 PM

Hi heldman,

Thanks for your reply,Finally i got functionality as required with  few modifications in utilizing your plugin.

I thought of sharing if anyone with java can get help with this

instead of getdata.jsp in

$('#ffb').flexbox("getdata.jsp", {
    });

edited to

$('#ffb').flexbox(variables, {
    });

and while returning data instead of json object returned jsonarray

and passed that to flexbox()

with follwing in script

variables.results = <%=variableRtn%>;
    variables.total = <%=len%>;
    $('#ffb').flexbox(variables, {
    });

and added these lines to jsp scriptlet

JSONArray variableRtn=chartinghomeService.getBasicSearches();
     int len=variableRtn.toJSONString().length();

 

Thanks for plugin with which my time got saved.

Thanks&Regards

Sudheer Kosuru