how to select checkbox based on a hashmap

S Ahmed <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <CAG2rwuO5ZTxbKpAVzk1hp5sPub-ejw5BAYbwniUHBqTrJRzAaw@mail.gmail.com>
So I have a hashmap that contains the projects that the checkbox should be
checked for:



Map<Integer, Project> userProjects = new HashMap<Integer, Project>();


So far my .ftl looks like:



  <#list projects as project>
                    <tr>
                        <td><label class="checkbox"><input
id="project-${project.id}" name="project-${project.id}"

type="checkbox" />${project.name}</label></td>
                    </tr>
                </#list>


How can I make the checkbox 'checked' if the hashMap contains an
entry?  The key is project.id

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct

_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.