Prime-ui autocomplete forceSelection not working

jQuery UI Widgets
Post Reply
Berrisford
Posts: 10
Joined: 15 Jan 2013, 00:11

29 Jul 2013, 18:04

Hi;
I'm using the prime-ui autocomplete control (because the primefaces autocomplete control does not support partial update). I have my control defined thus:

Code: Select all

$(document).on('click','.amd_auto_look_up',
  function(event){
   $('.amd_auto_look_up').puiautocomplete({
     effect: 'fade',
     effectSpeed: 'fast',
     forceSelection: true,
     delay: 100,
     select: function (event, item) {
     updateFunder(item, "amd", $(this))
    },
    completeSource:function(request, response) {
    $.ajax({
    type: "GET",
    url: 'http://www.myURI',
     data: {query: request.query},
    dataType: "jsonp",
    context: this,
    success: function(data) {
    response.call(this, data);
    }
   });
  }
 });						
 event.stopPropagation();
 }
);			
If I set

Code: Select all

forceSelection: false,
all works fine. If I set

Code: Select all

forceSelection: true,
the autocomplete popup fails to display altogether. Would anyone be able to point me in the direction of a solution/workaround for this please?


Berrisford
Posts: 10
Joined: 15 Jan 2013, 00:11

30 Jul 2013, 11:28

Hi Optimus/Anyone;
Thanks for that. I'm quite new to using Maven. Would you be able to advise me as to how to get this update? In my .pom file I've got the references:

Code: Select all

	<properties>
		<primefaces.version>3.5</primefaces.version>
		<primefaces.extensions.version>0.7.0</primefaces.extensions.version>
		<jsf.version>2.2.0</jsf.version>
		<springframework.version>3.2.2.RELEASE</springframework.version>
		<jaxb.version>2.2.6</jaxb.version>
	</properties>

	<repositories>
		<repository>
			<id>prime-repo</id>
			<name>Prime Repo</name>
			<url>http://repository.primefaces.org</url>
		</repository>
	</repositories>
I've done a Maven update but I'm still having the same problem, so I'm assuming that I haven't actually got the fix. Would you be able to advise as to how to do so please?. (Apologies; I'm aware that this isn't strictly speaking within the remit of this topic)

rubus
Posts: 517
Joined: 01 Oct 2010, 09:41
Location: Belgium

30 Jul 2013, 11:43

Hello,

The fix is done in the PrimeUI code, not the PrimeFaces code.

Follow the link in the post of Optimus and look in the updated javaScript file.

Regards
Rudy
PrimeFaces version 3.5, Tomcat 7, Mojarra 2.1.13
PrimeFaces version 4.0, Glassfish 4.0
PrimeFaces version 5.0, WLS 12.1.2
If you haven't read the forum rules read them now : viewtopic.php?f=3&t=1194

Berrisford
Posts: 10
Joined: 15 Jan 2013, 00:11

30 Jul 2013, 12:39

Cancel that last enquiry, I've basically just manually retrieved and edited my prime-ui-0.95-min.js file (which is manually included on the page). Apologies.

Great work Optimus, works fine! And the speed of the response/fix as well - Awesome! Many thanks!!!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

30 Jul 2013, 13:56

Since we moved to GitHub last night, it should be easier now for you to maintain the changes;

https://github.com/primeui

Post Reply

Return to “PrimeUI”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests