yes I gave you part so you could find examples in code. find other code in other ftls that show this or use the tutorial. take a look at /framework/webapp/src/org/ofbiz/webapp/ftl
========================= BJ Freeman http://bjfreeman.elance.com Strategic Power Office with Supplier Automation <http://www.businessesnetwork.com/automation/viewforum.php?f=93> Specialtymarket.com <http://www.specialtymarket.com/> Systems Integrator-- Glad to Assist Chat Y! messenger: bjfr33man Linkedin <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> Patrick sent the following on 3/12/2010 4:01 PM: > that gives a parse error > > Error rendering included template at location > [component://ecommerce/webapp/ecommerce/order/orderitems.ftl]: > freemarker.core.ParseException: Encountered "{" at line 309, column 14 > in component://ecommerce/webapp/ecommerce/order/orderitems.ftl. Was > expecting one of: "in" ... ">" ... ... "." ... "[" ... "(" ... "?" > ... "!" ... ... "??" ... "+" ... "-" ... "*" ... "/" ... "%" ... "!=" > ... "=" ... "==" ... ">=" ... ... ">" ... ... ... ... ".." ... > ... ... "," ... ... ... > > > > On Fri, Mar 12, 2010 at 5:55 PM, BJ Freeman <[email protected]> wrote: >> try using "${testname}" >> >> ========================= >> BJ Freeman >> http://bjfreeman.elance.com >> Strategic Power Office with Supplier Automation >> <http://www.businessesnetwork.com/automation/viewforum.php?f=93> >> Specialtymarket.com <http://www.specialtymarket.com/> >> >> Systems Integrator-- Glad to Assist >> >> Chat Y! messenger: bjfr33man >> Linkedin >> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> >> >> >> Patrick sent the following on 3/12/2010 3:09 PM: >>> I am modifying the order confirmation email, I've tracked it down to >>> the "orderstatus" screen. >>> >>> <screen name="orderstatus"> <!-- truncated for brevity --> >>> <script >>> location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy"/> >>> <html-template >>> location="component://ecommerce/webapp/ecommerce/order/orderstatus.ftl"/> >>> </screen> >>> >>> basically OrderStatus.groovy loads up some variables which should be >>> available to the ftl file. >>> >>> In the groovy file I've got this simple line >>> context.testname = "hello"; >>> >>> So then I try to access it in the FTL file. orderstatus.ftl with a simple >>> <#assign xx=testname> >>> >>> But it says my variable is null. >>> >>> Error on line 312, column 1 in >>> component://ecommerce/webapp/ecommerce/order/orderitems.ftl testname >>> is undefined. It cannot be assigned to xx The problematic instruction: >>> ---------- ==> assignment: xx=testname [on line 312, column 1 in >>> component://ecommerce/webapp/ecommerce/order/orderitems >>> >>> Seems like a pretty simple test, I must be missing something. Any >>> tips are appreciated. >>> -patrick >>> >> >> >
