You already seem experienced in this manner! :-) I could see how this works. Creating my own on the fly rule model could solve the problem.
But like you said... where? Have to be session specific. James On Jan 15, 2012, at 1:50 AM, Farrukh Ijaz wrote: > 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. >> >> Thanks >> James >> >> >> >> _______________________________________________ >> 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: >> http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%40fuegodigitalmedia.com >> >> This email sent to farrukh.i...@fuegodigitalmedia.com >
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com