Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Map<String, Document> documents = new HashMap<String, Document>();
- public Collection<Document> getDocuments(){
- return documents.values();
- }
- <h:dataTable id="documentTable"
- value="#{DocumentManager.allDocuments}"
- var="doc" rowClasses="list-row-odd, list-row-even"
- headerClass="table-header" styleClass="bordered">
- <h:column id="col_name">
- <f:facet name="header">Name</f:facet>
- ${doc.name}
- </h:column>
- </h:dataTable>
- public List<Document> getDocuments(){
- List<Document> rtrn = new ArrayList<Document>();
- for(Document doc : documents.values())
- rtrn.add(doc);
- return rtrn;
- }
Add Comment
Please, Sign In to add comment