(no subject)

Nancy Wang <[email protected]>
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <CACZZE-szU_3L8uxh_bFmzJ5Yr4ETyDx6RFD-nwD20YMnhKugkw@mail.gmail.com>
Hi, all,

I have a ftl file, would like to know if there is a generic way to show all
field values of a user and all field names (suppose  I don't know what
fields are there in User bean)

ftl file
<table>
<tr>
<td>${user.firstName}</td>
<td>${user.lastName}</td>
<td>${user.dob}</td>
<td>${user.dep}</td>
</tr>
</table>


java file
        Map root = new HashMap();
        User user = new User();
        user.setFirstName("Byrant");
        user.setLastName("Johnson");
        user.setDob("19800920");
        user.setDep("HR");

        root.put("user", user);

User bean
private String firstName;
private String lastName;
private String dob;
private String dep;
public String getFirstName()

.....................

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

_______________________________________________
FreeMarker-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
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.