almost..... I remember why I started down the path of all those accessors...
 
 If I view the table with the rows of contacts. then click on the first one in 
the list, it edits beautifully. I can change the category and the sub-category 
popup updates its self then I can choose the sub-cat and save the changes.
 
 it works... 
 
 however if I select any other row. it fails. I can change the category and the 
subcat popup has the wrong list. so I am looking at a change to 'banking' 
(category) and I see the subcat list for 'aviation'.
 
 this error only happens on the NON first element of the displayGroup. Is it 
possible that I have the displayGroup set up wrong?
 
 Ted
 
> --- On Sun, 6/21/09, Ricardo J. Parada <[email protected]>
> wrote:
> 
> > 
> > On Jun 10, 2009, at 1:43 PM, Theodore Petrosky
> > wrote:
> > 
> > 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;
> > }
> > 
> > 
> > Why do you need this?  You already have a
> > subCateogories to-many in your ContactCategory EO.  
> I
> > would use that instead.
> >  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);   
>         
> > }
> > 
> > 
> > See if you use your "existing"
> > subCategories relationship then you don't need this.
> >  Or maybe I'm missing something.
> >  :-)If you use your existing subCategories
> > to-many then you would have to work as hard.
> >  :-)
> >
> For example your subcategory pop-up would simply be something like this:
> > SubCategoryPopUpEEField : WOPopUpButton
> > { list = current.contactCategory.subCategories;
> >  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.
> > 
> > 
> > In the project you sent me, the selection binding for
> > your sub category pop-up is commented out in your
> > EditContactEntry component.  And like I said I think
> > that you should use your subCategories  to-many
> > instead.  To summarize: I would change the
> definition
> > for the sub-category pop-up to this (I have
> highlighted in
> > color the parts I changed):
> > SubCategoryPopUpEE :
> > WOPopUpButton {  list =
> > contactToEdit.contactCategory.subCategories;  id =
> > "SubCategoryPopUpEEID";  displayString =
> > subCatObject.subCatTitle;  item =
> > subCatObject;  selection =
> > contactToEdit.subCategory;}
> > Anyways, let
> > me know if I'm missing something... but I think that
> > should work.
> > 
> 
> 
> 
> 



 _______________________________________________
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]

Reply via email to