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> 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)
> 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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to