WebObjectTree Studio
Select Server:
  Reset
Custom Ajax:
This sample demonstrates how you can use your own custom Ajax code to populate the WebObjectTree children items. This is useful if you need to alter the built-in Ajax logic to match the requirements of your web applications.

In this sample the JavaScript callback method "cwotOnBeginRequest" is use to make an asynchronous call to our demo web service to fetch the data. The "jQuery.ajax" method is used to simplify the call.

If successful, the WebObjectTree method "cwotProcessResponse" is called to process the returned data.

If unsuccessful, an error message is displayed to the user. Note that in this case the "cwotProcessResponse" method is also called to complete the request and hide the loading elements.

In this sample the WebObjectTree is allowing you to select a datacenter server, organized by region, location and role. Clicking the "Submit" button will display the full path for your selection below:
Click the "Reset" link to clear your selection.
Control being used:
View the code:
The code is available in the samples directory under:
/DataRetrieval
    /CustomAjax