Hi all,

I am making an autocomplete component based on jquery-autocomplete.

I have currently implemented the data source using a stateless web page
which writes the json response.

What I don't like about this is that it is a separate file/class from my
autocomplete component. But I like that it's stateless.

Could I achieve the same effect (statelessness) using a dynamic resource
registered/created from within the autocomplete component? In other words I
want the autocomplete component, upon creation, to register a resource that
can be used to serve the autocomplete options. But I want the resource to
be stateless and lightweight and the requests to return the autocomplete
options should not have to go through the page that contains the
autocomplete component.

Furthermore, if I have the same autocomplete component twice in a page, the
resource should be registered only once and server requests for both
components.

Is this possible? Can you provide some guidelines?

Thanks
Marios

Reply via email to