• 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
wopopupbutton selection not updating in model ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wopopupbutton selection not updating in model ???


  • Subject: wopopupbutton selection not updating in model ???
  • From: Theodore Petrosky <email@hidden>
  • Date: Wed, 13 May 2009 10:43:41 -0700 (PDT)

I have Contacts that have Category and SubCategory(s).

I have two dependent popups (Category and SubCategory) for each contact.. CategoryPopup is being observed and has an action that populates the SubCategoryPopUp. SubCategoryPopUp's selection is bound to 
so far so good. the subcatpopup's selection is bound to current.subCategory.

If I edit a Contact, and change the subcat, submit the form and saveChanges() everything is okay. However if I change category (then the subcategory popup is repopulated) and change the subcategory at the same time, the subcategory doesn't get saved.

here are the popupbutton's HTML section:
<tr><td>Category</td><td><webobject name = "CategoryPopUpEE"/><webobject name = "CategoryPopUpEEObserveField"/></td></tr>
<tr><td>SubCategory</td><td><webobject name = "SubCategoryEEUpdateContainer"><webobject name = "SubCategoryPopUpEE"/></webobject><webobject name = "SubCategoryPopUpEEObserveField"/></td>

and the WOD

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

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

SubCategoryEEUpdateContainer : AjaxUpdateContainer {
	id = "SubCatEEDiv";
}

SubCategoryPopUpEE : WOPopUpButton {
  list = subCategoryList;
  id = "SubCategoryPopUpEEID";
  displayString = subCatObject.subCatTitle;
  item = subCatObject;
  selection = current.subCategory;
}

SubCategoryPopUpEEObserveField : AjaxObserveField {
	observeFieldID = "SubCategoryPopUpEEID";
	//updateContainerID = "editTableBody";
	//action = updateSubCat;
	fullSubmit = false;
}

here is the action from CategoryPopUpEEObserveField:

public void getSubCatsForCategoryEE() {

	EOQualifier qual = SubCategory.CONTACT_CATEGORY.eq(current.contactCategory());
	subCategoryList = SubCategory.fetchSubCategories(contactEC, qual, null);
	current.setSubCategory(subCategoryList.objectAtIndex(0));

}

I am at such a loss. I know the answer is staring me in the face.

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: WebObjects 5.3 Leopard
  • Next by Date: Re: WebObjects 5.3 Leopard
  • Previous by thread: Re: [MEETING] WO-NoVA WebObjects dev meeting 5/19/2009
  • Next by thread: Setting selected object in parent component
  • Index(es):
    • Date
    • Thread