• 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: Weird D2W rule selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird D2W rule selection


  • Subject: Re: Weird D2W rule selection
  • From: Fabian Peters <email@hidden>
  • Date: Thu, 23 Aug 2018 08:19:00 +0200

Hi Markus,

Have you checked whether the "region" key is present in the context of the
ERMDInspectPageRepetition – or whichever component is used to render the
display property lines?

Fabian

> Am 22.08.2018 um 15:11 schrieb Markus Ruggiero <email@hidden>:
>
> I just had a debugging session with a customer. He complained that
> "CreateProduct" page conf did not list the correct displayPropertyKeys. And
> indeed they are wrong. But why?
>
> Rule I want to work (list of properties truncated to anonymize the customer):
>
> 100 : (pageConfiguration = 'CreateProduct' and region = 'europe') =>
> displayPropertyKeys = ("productCode", .... )
> [com.webobjects.directtoweb.Assignment]    (list of properties I want)
>
> Rule that actually fires
>
> 100 : pageConfiguration = 'CreateProduct' => displayPropertyKeys =
> ("productCode", ....) [com.webobjects.directtoweb.Assignment]   (fallback
> rule with different list of properties
>
> That can be when region is not properly defined, BUT it is.
>
> Opening D2W debug output in the resulting browser shows at the very top when
> hovering over the "?" the list from the second, less qualified rule
> When entering "displayPropertyKeys into the little debug textfield I do get
> the expected list of properties (the one for 'europe').
>
> When manually asking for the displayPropertyKeys the first rule fires (which
> is what I expect) but the D2W template resolves via the second rule. Even
> reducing the priority of that rule to e.g. 80 does not give prio to the more
> qualified first rule. D2WTraceRuleFiringEnabled shows what is displayed in
> the app.
>
> Other pageConfigurations like EditProduct have similar rules but there the
> rule with "region" is firing - as it should.
>
> I inject the region code into d2wContext in the PageWrapper.awake() with the
> fillowing code lines:
>
>     public void awake() {
>         super.awake();
>         D2WContext ctx = d2wContext();
>         if (ctx != null) {
>         Application application = (Application)Application.application();
>             ctx.takeValueForKey( application.region().code(), "region" );
>         }
>     }
>
>     public D2WContext d2wContext() {
>         if (context().page() instanceof D2WPage) {
>             D2WPage d2wPage = (D2WPage) context().page();
>             return d2wPage.d2wContext();
>         }
>         return null;
>     }
>
> Any idea why this happens? Could this be a timing issue?
>
> ---markus---
> _______________________________________________
> 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

 _______________________________________________
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

References: 
 >Weird D2W rule selection (From: Markus Ruggiero <email@hidden>)

  • Prev by Date: in which EO behalf a ValueFactory works?
  • Next by Date: Re: in which EO behalf a ValueFactory works?
  • Previous by thread: Weird D2W rule selection
  • Next by thread: in which EO behalf a ValueFactory works?
  • Index(es):
    • Date
    • Thread