• 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
Fwd: ERModernDirectToWeb question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: ERModernDirectToWeb question


  • Subject: Fwd: ERModernDirectToWeb question
  • From: David Holt <email@hidden>
  • Date: Wed, 23 Feb 2011 11:34:25 -0800

Hi Paul,

Begin forwarded message:

From: Paul Halliday <email@hidden>
Date: February 23, 2011 10:19:17 AM PST
To: email@hidden
Subject: Re: ERModernDirectToWeb question

Hey David

Hope this post winds up at the right place.

I set up a delegate class and made a rule for it. I set the rule priority very high.

what is your rule?

I am using the NavigationController and navigation.plist from the ERModern example. Heavily modified.

That should be fine.

The navigation tab calls the NavigationController WOComponent for the query which returns queryPageForEntityName(SCHOOL_ADMIN)

You might want to try a named page configuration to limit the impact of your changes in testing. 

  public WOComponent queryDocumentAction() {
    ERD2WQueryPage page = (ERD2WQueryPage) D2W.factory().pageForConfigurationNamed("QuerySchoolAdmin", session());
    ...
  }

Prior to  including the delegate class the QueryPage for the Entity was controlled by a rule which limited the query criteria. 

What was that rule? Did it work? Why did you decide not to use the rule?

After the inclusion of the delegate class the Query page includes all the criteria ie. the controlling rules no longer fire or have the desired effect. 

Not sure why this is happening.

This also affects All the query pages launched from the navigation tabs for all the entities.

Definitely not sure why this is happening. Sounds like a problem with the scope of your rule(s)

When the find is initiated-- the datasource is not modified as per the delegate class -- it doesn't seem to be called.


In the delegate class I put the following qualifierFromSenderMethod.

  private EOQualifier qualifierFromSender(ERD2WQueryPage sender) {
    NSMutableArray<Object> args = new NSMutableArray<Object>();
    args.addObject(((Session)session()).schoolBoard().boardName());
    args.addObject(((Session)session()).school().name());
    EOQualifier qual = (EOQualifier.qualifierWithQualifierFormat( " schoolBoard.boardName = %@ and schools.name = %@ ", args));  
    ERXAndQualifier finalQual1 = new ERXAndQualifier(new NSArray<EOQualifier>(qual, sender.qualifier()));
    return finalQual1;
  }

the code below assumes the use of the Wonder templates for EOGenerate

  private EOQualifier qualifierFromSender(ERD2WQueryPage sender) {
    SchoolBoard sb = (((Session)session()).schoolBoard());
    School aSchool = (((Session)session()).school());
    EOQualifier q = School_Admin.SCHOOLBOARD.eq(sb).and(School_Admin.SCHOOLS.eq(aSchool)).and(sender.qualifier());
    return q;
  }



I couldn't seem to get your suggestion to get happy so I formulated the above to combine the two qualifiers.
Any help much appreciated.

Paul

 _______________________________________________
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: ERModernDirectToWeb question
      • From: David Avendasora <email@hidden>
  • Prev by Date: Re: ERModernDirectToWeb question
  • Next by Date: Re: ERModernDirectToWeb question
  • Previous by thread: Re: ERModernDirectToWeb question
  • Next by thread: Re: ERModernDirectToWeb question
  • Index(es):
    • Date
    • Thread