• 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
bindings and WOPopUp lists and selections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bindings and WOPopUp lists and selections


  • Subject: bindings and WOPopUp lists and selections
  • From: Theodore Petrosky <email@hidden>
  • Date: Wed, 10 Jun 2009 10:43:44 -0700 (PDT)

I am still having a bear of a time with some popups. I have objects ContactCategory and SubCategory

one ContactCategory many SubCategory(s)

My ContactCategory.java has setters and getters for an array of subcategories

public NSArray<SubCategory> theSubCategories() {
	return _theSubCategories;
}

public void setTheSubCategory(NSArray<SubCategory> theSubCatArray) {
	this._theSubCategories = (NSMutableArray<SubCategory>) theSubCatArray;
}

I read the Categories with:

contactCategoryList = ContactCategory.fetchAllContactCategories(contactEC);

then:

for (int i=0; i<contactCategoryList.count(); i++) {

   EOQualifier qual = SubCategory.CONTACT_CATEGORY.eq(contactCategoryList.objectAtIndex(i));
   NSArray<SubCategory> subCatArray = (NSArray<SubCategory>)SubCategory.fetchSubCategories(contactEC, qual, null);

   contactCategoryList.objectAtIndex(i).setTheSubCategory(subCatArray);
}

My popup buttons are bound like this:

CategoryPopUpEE : WOPopUpButton {
  list = contactCategoryList;
  id = "categoryEEPopUpID";
  displayString = categoryObjectForPopUp.categoryTitle;
  item = categoryObjectForPopUp;
  selection = current.contactCategory;
}

CategoryPopUpEEObserveField : AjaxObserveField  {
	updateContainerID = "SubCatEEDiv";
	observeFieldID = "categoryEEPopUpID";
	fullSubmit = false;

}

SubCategoryEEUpdateContainer : AjaxUpdateContainer {
	id = "SubCatEEDiv";
}

SubCategoryPopUpEEField : WOPopUpButton {
  list = current.contactCategory.theSubCategories;
  id = "subCatEEID";
  displayString = subCatObject.subCatTitle;
  item = subCatObject;
  selection = current.subCategory;
}

My problem:
When I view a record, I can change the CategoryPopUpEE and saveChanges or I can view a record and change the SubCat however, if I change the CategoryPopUpEE and the subCategoryPopUp list changes I can select a new subCat but the selection is not updating the selection binding.

I even tried to add an observeField that was watching the SubCategoryPopUpEEField with an action. If I view a record, then change the subCategory I get joy. However if I change the Category the observed action method does not fire when I change the SubCategoryPopUpEEField.

Help please.

What else can I send to help me through this dilemma?

Ted



 _______________________________________________
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

  • Prev by Date: Re: I need some help with this Ajax Dom stuff
  • Next by Date: Re: Hudson gives awt.headless error [SOLVED] (Where to put on the Wiki?)
  • Previous by thread: nsruleeditor (or nsprediateeditor) WebObjects equivalent
  • Next by thread: Re: bindings and WOPopUp lists and selections
  • Index(es):
    • Date
    • Thread