I patched both in a test application from within the Application’s finishInitialization() method. After this, then MPVWOConditional is used regardless of whether I use WOConditional in the .wod or <wo:if> in the .html.
@Override public void finishInitialization() { super.finishInitialization(); // Patch conditional components with our own ERXPatcher.setClassForName(MPVWOConditional.class, "WOConditional"); ERXPatcher.setClassForName(MPVWOConditional.class, "ERXWOConditional"); } > On Mar 14, 2017, at 10:04 AM, Ricardo Parada <rpar...@mac.com> wrote: > > Hi Theodore, > > If your .wod is using WOConditional then it uses WOConditional. You can test > it quickly by setting a breakpoint in ERXWOConditional’s appendToResponse > method. You’ll see that you won’t hit the breakpoint. > > Now, if you change it back to <wo:if> then you’ll hit the breakpoint. > > To summarize: > <wo:if> uses ERXWOConditional. > WOConditional uses WOConditional. > > There used to be a property in Wonder to patch WOConditional with > ERXWOConditional. I do not see it in the master branch anymore. > > Anyways, in your framework principal’s finishInitialization() method you > should be able to invoke ERXPatcher.setClassForName(ERXWOConditional.class, > “WOConditional”) to have it patched. Then you’ll hit the breakpoint whether > your .wod says WOConditional or ERXWOConditional. > > I’m gonna try that and use my MPVWOConditional for both. > > >> On Mar 14, 2017, at 9:52 AM, Theodore Petrosky <tedp...@yahoo.com >> <mailto:tedp...@yahoo.com>> wrote: >> >> so please confirm the correct way to use this in a WOD. I understand that >> inline <wo:if> uses ERXWOConditional >> >> I had a <wo:if condition =“true”> and converted to WOD. I got: >> >> True : WOConditional { >> condition = "true"; >> } >> >> So, ERXWOConditional patches WOConditional, so ERXWOConditional is used. Yes? >> >> Just for my edification.. >> >> Ted >> >> >>> On Mar 14, 2017, at 9:39 AM, Samuel Pelletier <sam...@samkar.com >>> <mailto:sam...@samkar.com>> wrote: >>> >>> Hi, >>> >>> If you use inline bindings with ONGL, the class WOHelperFunctionTagRegistry >>> registers classes mapped to tag >>> >>> WOHelperFunctionTagRegistry.registerTagShortcut("ERXElse", >>> "else"); >>> >>> WOHelperFunctionTagRegistry.registerTagShortcut("ERXWOConditional", "if"); >>> >>> WOHelperFunctionTagRegistry.registerTagShortcut("ERXWOConditional", >>> "conditional"); >>> >>> Samuel >>> >>> >>>> Le 13 mars 2017 à 19:46, Ricardo Parada <rpar...@mac.com >>>> <mailto:rpar...@mac.com>> a écrit : >>>> >>>> Hi all, >>>> >>>> Does anybody know where does ERXWOConditional install to replace >>>> WOConditional? >>>> >>>> I created an MPVWOConditional which extends ERXWOConditional and fixes a >>>> bug and want to install it as the one to use for WOConditional. >>>> >>>> I checked in ERXPatches but it does not seem to be getting installed >>>> there. Does anybody know? >>>> >>>> Thanks >> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com >> <mailto:Webobjects-dev@lists.apple.com>) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com >> <https://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com> >> >> This email sent to rpar...@mac.com <mailto:rpar...@mac.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/rparada%40mac.com > > This email sent to rpar...@mac.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