-
FEATURED COMPONENTS
First time here? Check out the FAQ!
@Bobzk
I am developing wrapping jquery ui widget to be a zk widget.
Autocomplete is wrapped.
You may take a look in the project
jQuery4j http://code.google.com/p/jquery4j/
I'm writing smalltalk about it.
I haven't try to mix zk component with jquery ui widget.
I think it's feasible,
you have to get the sync the data between zk widget and jquery ui widget and server.
@Bobzk
i'm trying todo the same thing as you are? were you successfull in getting it to work?
thanks
goutham
@PeterKuo
i'm using the autocomplete widget, how can i add onBlur event to it? and is there a way to override the matching logic like we can do in jquery, like doing the following thing where in the source we can specify the method to call.
<script type="text/javascript">
$(function() {
// fetch data
var terms;
$.ajax({
url: 'terms.txt',
success: function(data) {
terms = data.split("\n");
}
});
// create autocomplete box
$("#autocomplete").autocomplete({
delay: 150,
minLength: 3,
source: function(req, resp) { resp(findTerms(req.term)) }
});
function findTerms(q) {
var words = q.split(" ");
var re = new Array();
for (var i=0; i<words.length; i++) {
re = new RegExp("\\b"+words, "gi");
}
var found = new Array();
var j = 0;
for (var i=0; i < terms.length; i++) {
match = true;
for (var k=0; k<words.length; k++) {
if (!re.test(terms)) {
match = false;
break;
}
}
if (match) {
found = terms;
j++;
}
}
return found;
}
});
</script>
crsna,
No, not that I tried too hard - used the server to do it all in the end because of development time.
However obviously (for performance) prefer to do it at client, so if ever you get it working correctly let me know - thanks.
i was able to integrate the zk Textbox with JqueryUI autcomplete widget. i can send you the code. i wanted to use Peterkuo's autocomplete widget, but did not know how to do callback for source ans also customize the list to use Scott "González' html extension"
Please send it to me also. dagarwal82 gmail
Asked: 2010-04-29 10:12:17 +0800
Seen: 1,290 times
Last updated: Jan 11 '12