Primefaces p:autocomplete component doesnot works under dialog box - jsf-2

I am using primefaces p:autocomplete component (primefaces version 3.0), its working fine , but I am getting 2 issues with it.
First is when I am puuting p:autocomplete component inside dialog box ,and if a user gets suggestions after some typing keywords, it stuckes, neither we can type anymore nor we can use backspace .
Second is p:autocomplete component suggestions are case sensitive.But user should get always suggestions whether he didnt used capital letters.
As a e.g: if a name is stored in database as "John" with capital letter, but if a user type 'jo' with small case letter he should get suggestion as a "John".
How can I solve it?

I don't have a specific answer for your first part. Possibly a PF bug. Is it just the autocomplete that sticks? Does the whole browser hang? Are you able to use other controls on the page?
As for the case sensitivity, you would control that in your autocomplete method on the backing bean. If you want to ignore case, use .toLowerCase(), .toUpperCase(), .equalsIgnoreCase() in your compare.

Related

Jquery Select2 multiselect with Dragon NaturallySpeaking

I have implemented a select2 multiselect for list of states in a application, and it works fine using typing the state names. But with Dragon NaturallySpeaking software if you speak in select2 to select a state, it only show the last char of what you spoke and do not autosearch, you have to press space to see the whole text and then press backspace to start the search, looks like some event does not fire when you speak than type. Not sure if there is any solution that I can try. I have tried to fire the change event manually.. but not working !
Since the select2 box is not Select and Say, you probably need to dictate into the dictation box and transfer it over. Or, write a script to take in the dictation, convert it to what you need, and then paste it to clipboard. Then go over to box and paste from clipboard. Let us know what worked . . .
I have added a check if the selected element class is select2-search__field then I trigger a $(activeElement).trigger('change') in that element. that seems doing the job

How to preselect capslock in TouchKeyboard component

I am working with Delphi TTouchKeyboard component. Because in later use people will mainly use capital letters, I would like to preselect capslock.
My problem now is, that the Touchkeyboard only changes its key caption when I click directly on a key. If the state is toggled by an (external) keydown message, one can use capital letters, but the keyboard component will still dislpay small letters on the keys. How could I solve that?
As far as I can see the only work arround is to edit the original source code.
http://qc.embarcadero.com/wc/qcmain.aspx?d=88770 (I haven't tested it)
I've tried to write a patch with this code but with out any luck because I can not acces the private field Fbuttons.
So if you want this you'll have to patch the original code

ios/xcode/coredata: How to mimic ajax call in objective c

For a tag system, when entering a new item, I'd like the user to start typing a letter or two and see possible tags...similar to how SO tags work on the website i.e. Ajax.
Is there a way to do this on IOS?
Basically the Add Item screen has some empty text fields where you put the name etc.
I'd like to have an additional empty field where as you enter letters you see possible tags appear below and can then select one to tag the item.
The tags would be served from an entity or table so there would have to be a call to core data to supply them based on the letters typed.
Do I have to implement a full blown tableview to do this? Or is there a way to make the possible tags show up below the textfield box.
Thanks for any suggestions.
You could try a third party development in order to make what you want. In a recent project I have used this one:
https://github.com/EddyBorja/MLPAutoCompleteTextField

ListGrid: Need to show icons in an editable field for a many to one relationship

My problem seems simple. But have not been able to solve till now. Any help would be appreciated.
I have a listgrid showing certain records from a datasource. One of the fields is a many to one. When I try to edit any record, I get a dropdown with all the possible values that the record can have. All fine thus far. The issue is that all the dropdown values are displayed as simple text. I wish them to be displayed as shown in this link.
The requirement is to have "A SelectItem with icons" on the listgrid.
Regards
Use ListGridField.setEditorType() to customize the editor shown for a field. This API takes a FormItem, so pass a SelectItem configured similarly to the sample you linked to.

Auto Search functionality for Schools/Universities using Asp.Net MVC

I am building a website where the user should have the capability of adding their School/University. I have noticed in LinkedIn, when i tried to type in my school name , it showed up a auto search box with all the schools, beginning with the letter i typed. How can i achieve the same functionality?
Do they save all the Universities in their database ? Or is there any Open webservices i can use that will show all the Schools/Universities ?
Thanks !
This feature is called "Auto Complete" and the text boxes are enabled with that. These allow you to filter the data required according to the characters you type in.
Please see this post for auto-complete feature implemented using jQuery.
Razor: Auto-complete text box inside jqGrid, How to bind values?
The example shown in that page lists all from the database. However, as a next phase, you can as well extend this feature to look for a WCF exposed service for universe of schools/colleges.
FYI" "GetSkillNameAutocomplete" is a method in the controller that takes a string parameter as an input (the search string) and gets the value(s).
Hope this helps!

Resources