Multiple AjaxProxy objects on one page
Multiple AjaxProxy objects on one page
- Subject: Multiple AjaxProxy objects on one page
- From: Damian Stasiak <email@hidden>
- Date: Tue, 10 Jul 2012 15:19:44 +0200
Hi,
I'm trying to implement autocomplete based on my database and I want to
use AjaxProxy for that. I have two different fields on the same page
that need to be auto completed. I create two AjaxProxy objects:
FirstAutocompleteProxy : PMAjaxProxy {
name = "autocomplete";
proxy = firstProxy;
proxyName = "firstName";
}
SecondAutocompleteProxy : PMAjaxProxy {
name = "autocomplete";
proxy = secondProxy;
proxyName = "secondName";
}
and I want to use in my javascript code sth like this:
autocomplete[this.proxyName].getSuggestions(value);
where firstProxy and secondProxy implements interface that has method
getSuggestions(String).
Unfortunately only first object is created and only it works. Can I use
the same name for both objects and manipulate only with proxyName? If
not, how can I use multiple proxies on one page?
--
Damian Stasiak
Power Media S.A.
ul. Grabiszyńska 241B
53-235 Wrocław
http://www.power.com.pl
Sąd Rejonowy dla Wrocławia Fabrycznej
KRS 0000281947
NIP: 898-16-47-572
Kapitał Zakładowy: 640.000 PLN
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden