dcsimg
Showing a List of Maps in a dataTable
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Chagh_asdf
Posted On:   Wednesday, August 9, 2006 04:49 AM

Hi all, How can we show a List of Maps in a DataTable in JSF? (Rows iterate on List and columns iterate on Maps index. like a table with dynamic header and values.) Verbose Question: I am new to JSF and developing a search application using it. I've got a search.jsp page which a user can type his query in it and also choose his results format from some checkboxes whithin this page. I've got a Document class which has got different attributes of a document like its name, ceator, etc . result format contains some attributes of a Document which the user wants to see in the results page. when the search is done via a search API i fill a List of a Map as the search result and pass it to my result.jsp pag   More>>

Hi all,

How can we show a List of Maps in a DataTable in JSF? (Rows iterate on List and columns iterate on Maps index. like a table with dynamic header and values.)


Verbose Question:
I am new to JSF and developing a search application using it. I've got a search.jsp page which a user can type his query in it and also choose his results format from some checkboxes whithin this page.

I've got a Document class which has got different attributes of a document like its name, ceator, etc . result format contains some attributes of a Document which the user wants to see in the results page.

when the search is done via a search API i fill a List of a Map as the search result and pass it to my result.jsp page. a List 'cause number of founded documents can be more thn one and a Map 'cause user can choose different attributes of a Document to e shown and this map is of pairs of (e.g. <"creator", "Alex">)

Now I want to show this List of Maps in my Result.jsp page so that the header of my dataTable tekes its values from the Map index(first element of each pair) and each row represent a document.

(e.g. the results table:
creator docName path

------------------------------------------------

Alex test.txt c:/temp/test.txt

--------------------------------------------------

Ach new.doc c:/new.doc

)

   <<Less
About | Sitemap | Contact