Hi,

        I successfully used AjaxAutoComplete in a few places in my app. I was 
able to get 2 AjaxAutoComplete to work in the same page but I get this 
“quouizy" feeling I did it wrong but got it working anyway.

But now I’m trying to use it inside a wo:repetition and not getting any luck. 
Is that possible ?  I seem to remember discussion about setting unique element 
ID  but could not locate anything in the mail archives.

Pointers ?

Thanks for any help



PS: Here is how I got 2 AjaxAutoComplete to work in the same page.

Partial .wo _________________________
  <div>
            <div class = "label">sold by:</div>
            <wo:AjaxAutoComplete value = "$aSellerString" list = 
"$candidateSeller" displayString = "$aSeller.fullName" item = "$aSeller" 
selection = "$selectedSeller" maxItems = "20" size = "20" />
          </div>
          <div class = "info">
            <pre><wo:str value = "$sal.soldBy.coordinates"></wo:str> </pre>
          </div>
        </div>
        <div class = "cell">
          <div>
            <div class = "label">sold to:</div>
            <wo:AjaxAutoComplete value = "$aBuyerString" list = 
"$candidateBuyer" displayString = "$aBuyer.fullName" item = "$aBuyer" selection 
= "$selectedBuyer" maxItems = "20" size = "20" />
          </div>
          <div class = "info">
            <pre><wo:str value = "$sal.soldTo.coordinates"></wo:str> </pre>
          </div>
        </div>
Partial .wo _________________________


Partial .java ___________________________

        public String aSellerString;
        public Contact aSeller;
        private Contact selectedSeller;

        public String aBuyerString;
        public Contact aBuyer;
        private Contact selectedBuyer;

        // 
__________________________________________________________________________________________________________________
        public NSArray<Contact> candidateSeller() {
                return Contact.suggestions(ec, aSellerString);
        }

        // 
__________________________________________________________________________________________________________________
        public NSArray<Contact> candidateBuyer() {
                return Contact.suggestions(ec, aBuyerString);
        }

        // 
__________________________________________________________________________________________________________________
        public NSArray<Contact> candidateBiller() {
                return Contact.suggestions(ec, aBillerString);
        }

        // 
__________________________________________________________________________________________________________________
        public NSArray<Spec> candidateSpec() {
                return Spec.suggestions(ec, aSpecString);
        }

        // 
__________________________________________________________________________________________________________________
        public Contact getSelectedSeller() {
                return selectedSeller;
        }

        public void setSelectedSeller(Contact selectedItem) {
                sal.setSoldByRelationship(selectedItem);
                selectedSeller = selectedItem;
        }

        // 
__________________________________________________________________________________________________________________
        public Contact getSelectedBuyer() {
                return selectedBuyer;
        }

        public void setSelectedBuyer(Contact selectedItem) {
                sal.setSoldToRelationship(selectedItem);
                selectedBuyer = selectedItem;
        }

        // 
__________________________________________________________________________________________________________________

____________________________________



Louis Demers eng.
www.obzerv.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to