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

Re: bindings and WOPopUp lists and selections


  • Subject: Re: bindings and WOPopUp lists and selections
  • From: Theodore Petrosky <email@hidden>
  • Date: Sun, 21 Jun 2009 17:10:07 -0700 (PDT)


 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@hidden>
> 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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: bindings and WOPopUp lists and selections
      • From: "Ricardo J. Parada" <email@hidden>
  • Prev by Date: Re: ERXJSOpenWindowSubmitButton
  • Next by Date: ERSelenium testing, set a blank string for a text field
  • Previous by thread: bindings and WOPopUp lists and selections
  • Next by thread: Re: bindings and WOPopUp lists and selections
  • Index(es):
    • Date
    • Thread