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 <mailingli...@kataputt.com>: > > 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 (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com > > This email sent to lists.fab...@e-lumo.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com