It's possible. You need to play around with the D2WContext, D2WModel and Rule classes.
Start with creating your own D2WModel class since it has methods to update Rules.
public class MyD2WModel extends D2WModel {
public MyD2WModel(NSArray<Rule> rules) {
super(rules);
}
public void addMyRule(Rule newRule) {
super.addRule(newRule);
}
}
You can override other methods as needed.
I would suggest implement a singleton pattern for MyD2WModel, and use that whenever you want to infer keys. Whenever you need to access D2WContext with your rules, do something like this:
D2WContext d2wContext = new D2WContext(session);
d2wContext._setModel(MyD2WModel.singleton());
Just hack around and see where you need to place it to make it accessible in your templates. May be some guru out there can point out the exact place to hack ;)
Have fun coding!
Farrukh
On 2012-01-13, at 8:20 PM, James Cicenia wrote:
Ok, is it possible to dynamically load up a rule set?
If that is possible I could create the a rule for each dynamic key.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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