I am trying to control the list of visible entities through a rule file. That
works as expected. However the same app is deployed in several regions. Each
region has its own requirements for the visibleEntityNames. So I create a key
"region" in the D2WContext and use this in various places throughout the app to
show/hide (non-)relevant fields. I inject the region-key into the D2WContext in
the pageWrapper awake() (probably overkill)
public void awake() {
super.awake();
D2WContext ctx = d2wContext();
if (ctx != null) {
Application application =
(Application)Application.application();
String region = "UNKNOWN";
if (application.isEurope()) {
region = "europe";
}
else if (application.isPefa()) {
region = "pefa";
}
else if (application.isNorthAmerica()) {
region = "na";
}
ctx.takeValueForKey( region, "region" );
}
}
It works everywhere except for visibleEntityNames. Obviously this list is built
before the first pageWrapper is instantiated. At that moment region is not yet
set. The resulting list of entities is never rebuilt later, so my rule
region="europe" => visibleEntityNames=....
never fires. How can I solve this? When is the list of entity names built?
Where would I have to inject the region key into the D2WContext for the proper
rule to fire?
Thanks
---markus---
_______________________________________________
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]