Using the WebCenter People Connections Service REST APIs with Ext
The HTML page
Add a destination div in the body of the page. The GridPanel is rendered in this div.
Step 1: Query the resourceIndex.
Notice that this example asks for responses in JSON format.
Step 2: Send an authenticated request to the People Connections entry point, and get the Connections list URL from the response.
By default , the REST API uses Basic authentication for secure APIs. In this example, credentials for passing to the Connections list URL are Base64 encoded. Ext does not have a Base64 utility object itself, but one has been developed for it.
Step 3: Send an authenticated request to the Connections list URL.
Step 4: Add the response to a JsonStore.
Previously, this example names displayData() as the handler for a successful call to the Connections list URL. Now, it creates the function and adds the JsonStore code. In the JsonStore, define the data model for the data and map it to results expected from the REST call.
Step 5: Create an Ext GridPanel to display the JsonStore.
In the grid, define the columns and title. Set other display options, such as the size of the table. Append the following code to displayData():
Step 6: Render the GridPanel.
Finally, append this last line to displayData():
You must run Ext on a web server. If that server is not WebCenter, then you will run into cross-site scripting problems. If you cannot run the example on your WebCenter server, and you want to use Ext, consider a proxy, such as Apache or WebCenter Ensemble.