that API is actually rather old and the class has been deprecated and then reimplemented.
Jacopo On May 18, 2012, at 10:13 AM, Deepak Dixit wrote: > Hello Adam, > > We can't pass *null* from ftl if we have to pass null then we can use *NULL* > like: > > <#assign productStroe = > delegator.findList("ProductStore",NULL,NULL,NULL,NULL, false) /> > > Passing *null* is prohibited in NodeListModel class > (http://www.docjar.org/docs/api/freemarker/ext/xml/NodeListModel.html). > > To create an empty model, pass it an empty collection. If we pass an empty > list in new findByAnd method then it should work fine: > > <#assign shipmentReceipts = delegator.findByAnd("ShipmentReceipt", > {"orderId": orderHeader.getString("orderId"), "orderItemSeqId": > orderItem.orderItemSeqId}, [], false)/> > > I have tested it and its working fine. > > > Thanks & Regards > -- > Deepak Dixit > > On May 18, 2012, at 1:15 PM, Adrian Crum wrote: > >> On 5/18/2012 5:50 AM, Adam Heath wrote: >>> On 05/17/2012 12:23 PM, Jacopo Cappellato wrote: >>>> file are attached; that bug tracker is really awful. >>> >>> This is all becoming very troubling. >>> >>> == example methods >>> String a(String name, List list) {} >>> String a(String name, Map map) {} >>> String a(Object[] args) {} >>> >>> String b(String name, List list) {} >>> String b(String name, Map map) {} >>> String b(Object... args) {} >>> >>> == example templates >>> ${object.a(string, null)} >>> ${object.b(string, null)} >>> >>> == >>> >>> In 2.3.18, freemarker can't find any methods at all. In 2.3.19, it can >>> find the b vararg method. In either situation, that is wrong. >>> >>> The correct situation for both is to say there are 2 matching methods, the >>> List and Map variants. Without my patch, when a null is used, any >>> non-primitive method will never be considered as a possible candidate. >>> >>> I'm still discussing with freemarker upstream, but I get the feeling that >>> they won't provide a fix for the 2.3 branch, and a true, correct fix for >>> 2.4 will be long in coming. >>> >>> This means we need to come up with a workaround for ofbiz. I'm up for >>> suggestions. We really can't undo the change, that just doesn't seem right >>> to me. >>> . >> >> In my experience with FreeMarker, there are a lot of things that are >> replaceable - like TemplateLoader and TemplateExceptionHandler. Does >> FreeMarker have a "Object Method Resolver" that we can replace? Would a >> custom BeansWrapper help? >> >> -Adrian >> >