From: Helge H. <hel...@op...> - 2008-03-27 22:19:42
|
On 27.03.2008, at 22:06, Mike Schrag wrote: > Not currently, though it may be coming. I still say $xxx is a better > syntax than [xxx]. The problem is that configurable inline binding > syntaxes makes things a complete mess. BTW: What we do in SOPE is using XML namespaces/prefixes to select arbitrary WOAssociation classes, which IMHO is quite nice. Its a bit more to type, but it pushes WOAssociations to a new level, because you can actually invent new binding styles in a rather clean way. Just like with EOAssociations. W/o it you are basically tied to WOValueAssociation and WOKeyPathAssociation (plus the OGNL ~ thing in Wonder). Examples: <var:string value="customer.lastname"/> <var:string ognl:value="customer.getPreferredAddress().street" /> <var:string xpath:value="xmlDocument:/customer/@lastname" /> <var:string label:value="pagetitle" /> <var:string format:value="%(customer.lastname)s: % (customer.amount)i" /> <var:for plist:list="( a, b, c)">... <var:if js:condition="customer.code.match(/C\d+/)" /> We then have a bindings from 'ognl' to WOOgnlAssociation etc (actually from the XML namespace to the class in the XML case). What I like about it is that we don't need to mess with the content of attributes, its always the string as-is. All the markup processing is just plain XML-NS. Greets, Helge -- Helge Hess http://www.helgehess.eu/ |