Thursday, February 14, 2008

ExtJS Ajax Search field

Here is a screenshot of an AJAX search field running in Apex. Putting an example up on the Oracle Apex demo site may not be possible, as I call a PL/SQL package directly. It's based on the ExtJS live search sample. We were running it with Ext version 1.1, but had issues with paging. By default it uses "start" and "limit" as parameters - both reserved words with PL/SQL. If you search the Ext forums, you'll find a solution for Ext 2.0 - just search for mark.lancaster.

9 comments:

Patrick Wolf said...

Mark,

there should be no problem to create a package/procedure on apex.oracle.com. Just grant it to apex_public_user or public as you would normally do.

Patrick

Patrick Wolf said...

BTW, this posting has no title... :-)

Mark Lancaster said...

Hi Patrick

Thanks for the tip on packages, I'll try it out soon.

Sometimes I make assumptions without investigating first :)

Anonymous said...

Nice work.

I tried to test the same on my apex page. But I am getting some error message "invalid label".

I have used same procedure that u mentioned. Below I have pasted the json data ( pl/sql procedure output)

{"totalRows":4,"rowset":[ {"id":"1", "customer":"Test","address":"Manama","locality":"Test","email":"Test@gmail.com"}, {"id":"2", "customer":"Test Hi","address":"Manama","locality":"Test","email":"Test@gmail.com"}, {"id":"3", "customer":"Test and Test","address":"Manama","locality":"Test","email":"Test@gmail.com"} ] }

Anonymous said...

I found the problem.

Once again thx

Seek said...
This comment has been removed by the author.
Anonymous said...

hi Satheesh Kumar
i have the same result plsql
but have an error invalid label
{"totalRows":1,
"rowset":[
{"ind":"164",
"nom":"amel",
"prenom":"",
"adress":"aaaaaaaaaa"}
] }
can you help me please

Anonymous said...

i resolved the probleme
you should beginning the return data json with(stccallback)exactelly we should create in pl/sql:
"htp.p(p_callback||('({"totalRows":..)"
so the p_callback is the parameter of procedure (customer_lookup)

Good luck for evry when , i hope that help yuo
thank you very much for this post Marck_Lancaster
you are the baest.....
regerd anonymous

Cj (Bar Staff) said...

Hi,

I am still trying to get this working, but I think I am having problems with getting the SQL procedure correct.

My Javascript seems to be almost identical to Mark's demo app.

Is there any chance an example of the PL/SQL procedure could be posted? I think my issues may lie around the callback, but not 100% sure!

I look forward to your responses.

Kindest Regards,

Cj