• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Multiple AjaxProxy objects on one page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Multiple AjaxProxy objects on one page
      • From: Jean-François Veillette <email@hidden>
  • Prev by Date: ERXEC and locking
  • Next by Date: FW: Custom D2W Navigation
  • Previous by thread: Re: [Wonder-disc] ERXEC and locking
  • Next by thread: Re: Multiple AjaxProxy objects on one page
  • Index(es):
    • Date
    • Thread