Your setup seems to be a dependent pop-up scenario, with a category
pop-up and a sub-category pop-up. You are not using the name binding
so I don't think you are hitting the same problem as me.
If you are using WO 5.4.3 make sure you have a recent version as there
was a problem in 5.4.3 and dependent pop-ups. See
http://issues.objectstyle.org/jira/browse/WONDER-300 or just upgrade
to a newer version of Wonder.
You did not include .html file! Are you wrapping your pop-ups in a
form? Have you compared with the dependent pop-up example in Wonder?
On Jun 20, 2009, at 2:43 PM, [email protected] wrote:
I have a similar problem with popoups and loosing the connection to
the selection. I am wondering if you can shed some light on the
problem...
basically, I have two popups (Category and SubCategory). If the user
changes the Category, the action method then goes off to the backend
to get the list for the subcategory.
this is a copy of what I sent to the [email protected]
mail list.:
any chance this looks similar....?
++++++++
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]