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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]