views:

445

answers:

1

I have a specific requirement to have autocomplete in an Oracle BPM project. I have been trying to figure out the best way to achieve this activity. I have a good foundation of jQuery and auto-complete. What way do you find yourself satisfing these types of requirements?

I would like to get the response straight from the object.

+1  A: 

I'm assuming you are using JSPs to present your BPM Object:

First, define your BPM Object method to receive one single argument of type String[][String] (http parameters of the request), and returning String (the content of your response).

Then, in your JSP/JavaScript, use Fuego tag "" to get the URL to which you will do an XHR request.

Example, with jQuery:

$.ajax({
    type: "GET",
     url: "<f:invokeUrl var='${viewObject}' methodName='loadCandidates'/>",
    data: xhrArgs,
dataType: "text",
 success: function(data, status) {
     /* your code here. data contains the String
        returned   by your method */
 }
});

Where viewObject is the bpm object variable you are passing to the JSP page.

For details on the tag libs see: OBPM JSP Tag lib.

FerD