Re: Help with the <#list> directive with a sequence
Bruce Perryman <[email protected]> Wed, 1 Feb 2006 08:03:20 -0800 (PST)
| Newsgroups | gmane.comp.text.fmpp |
|---|---|
| Message-ID | <[email protected]> |
--0-1526297815-1138809800=:32161 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I think I understand now, based on your response. Again, I'm new to this = (FreeMarker). I was looking at the class member names not the names from = the methods. Thanks. Daniel Dekany <[email protected]> wrote: It's strange what you are sayi= ng, because FreeMarker (and FMPP) doesn't "translate" any names. It uses JavaBean property names as is (according the JavaBeans specification), and Map items with their string keys as is. Maybe your predecessor did some hack, like defined property names explicitly in Java rather than letting it deduce them from the method names, or plugged in a custom FreeMarker ObjectWrapper. Or, where does the said collection come from? How is it "loaded" into the data model? --=20 Best regards, Daniel Dekany =20 Tuesday, January 31, 2006, 6:00:02 PM, Bruce Perryman wrote: Hi, I've inherited a project that uses freemarker and I need help understanding a concept. I am very new to freemarker. A Collection (List) is being used with a <#list> directive namely if the collection is named stuff, the <#list> is: <#list stuff as x> and its elements as ${x.fieldname} where fieldname is an element in the collection. What confuses me is that the fieldnames used aren't consistent with the definition of the collection. For example, if the collection is defined as having fields day_of_week and emp_Id, the syntax of the list references ${x.dayOfWeek} and ${x.empID} How do I find out where the mapping of the names takes place? Thanks for your help in advance. Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on n= ew and used cars. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D= 121642 _______________________________________________ fmpp-open mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fmpp-open =09 --------------------------------- =20 What are the most popular cars? Find out at Yahoo! Autos=20 --0-1526297815-1138809800=:32161 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I think I understand now, based on your response. Again, I'm new to this = (FreeMarker). I was looking at the class member names not the names from = the methods.<br><br>Thanks.<br><br><b><i>Daniel Dekany <ddekany@= freemail.hu></i></b> wrote:<blockquote class=3D"replbq" style=3D"borde= r-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"= > It's strange what you are saying, because FreeMarker (and FMPP) doesn't= <br>"translate" any names. It uses JavaBean property names as is (accordi= ng<br>the JavaBeans specification), and Map items with their string keys = as<br>is. Maybe your predecessor did some hack, like defined property nam= es<br>explicitly in Java rather than letting it deduce them from the meth= od<br>names, or plugged in a custom FreeMarker ObjectWrapper.<br><br>Or, = where does the said collection come from? How is it "loaded" into<br>the = data model?<br><br>-- <br>Best regards,<br> Daniel Dekany<br><br> <br>Tue= sday, January 31, 2006, 6:00:02 PM, Bruce Perryman wrote:<br><br>Hi,<br><br>I've inherited a project that uses freemarker a= nd I need help<br>understanding a concept. I am very new to freemarker. A= Collection<br>(List) is being used with a <#list> directive namely= if the collection<br>is named stuff, the <#list> is:<br><br><#l= ist stuff as x><br><br>and its elements as<br><br>${x.fieldname} where= fieldname is an element in the collection.<br><br>What confuses me is th= at the fieldnames used aren't consistent with the<br>definition of the co= llection. For example, if the collection is defined<br>as having fields d= ay_of_week and emp_Id, the syntax of the list<br>references<br><br>${x.da= yOfWeek} and ${x.empID}<br><br>How do I find out where the mapping of the= names takes place?<br><br>Thanks for your help in advance.<br><br>Yahoo!= Autos. Looking for a sweet ride? Get pricing, reviews, & more on new= and used cars.<br><br><br><br><br>--------------------------------------= -----------------<br>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files<br>for problems?= Stop! Download the new AJAX search engine that makes<br>searching your= log files as easy as surfing the web. DOWNLOAD SPLUNK!<br>http://sel.a= s-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D= 121642<br>_______________________________________________<br>fmpp-open ma= iling list<br>[email protected]<br>https://lists.sourceforg= e.net/lists/listinfo/fmpp-open<br></blockquote><br><p> <hr size=3D1> <BR>=20 What are the most popular cars? Find out at <a href=3D"http://us.rd.yahoo= .com/evt=3D38382/_ylc=3DX3oDMTEzNWFva2Y2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFnc= wRzbGsDMmF1dG9z/*http://autos.yahoo.com/newcars/popular/thisweek.html=20 ">Yahoo! Autos</a>=20 --0-1526297815-1138809800=:32161-- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642