Oracle BPM Ajax to Fuego Object
-
12-09-2019 - |
Question
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.
Solution
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.