How can we implement AJAX in forms builder?
I need to retrieve the values from custom logic. Is it possible to call webservice from the form using AJAX?
Hi,
If you need to retrieve values to populate say a list control on a form using custom logic you write a DataSourceAdaptor. This adaptor is executed in the application server and it can invoke a WebService or do whatever is required to retrieve the values. Refer to Forms Builder Development Guide for details and examples.
Note though that a lot of external calls will add up significantly to the total rendering time of the form.
Hope it helps.
Thanks
--Tord
Hi Tord,
Thank you for the information. I implemented DQLdatasourceadaptor. Problem is that we have very large set of values where in it would be difficult for the user to choose from the drop down.
We need to implement feature like Google Suggest. Is there any way to achieve this in Forms Builder?
The closest you can get, that I can think of right now, is to have two fields where one depends on the value of the other, similar to what is discussed in this thread: https://community.emc.com/message/483058
Unfortunately that thread did not help me much as it discusses about cascading drop down but not AJAXed drop down.
Is there any way we can call javascript in Forms so that I can call my webservice?
Like I wrote, that is the closest you can get afaik and it doesn't have to be drop downs, you could do the same with a text field and a listbox. Which from a user perspective brings you pretty close to what you desired, albeit that you logic is placed inside an adaptor instead of in custom Javascript.
If Tords reply was not satisfying, you can try creating a component and action and call that action using invoke button in forms builder. Invoke button can call your action in popup window. Values can be returned from the action.
I believe this work around looks better from users perspective.
Refer forms builder dev guide/ user guide for more details.
If the field is a single valued one, you can try to use the Selector in TaskSpace. It will display a search form in a popup and the selected value will be returned for the field linked to the Selector button.
The limitation of the Selector is that it works find with search forms based on the sysobject, but not a registered table or any other external data sources.