I am using <ui:repeat> for displaying a list. Now I want to export whole list to the CSV file. Is there any way to do this in JSF 2.0?
I am using <ui:repeat> for displaying a list. Now I want to export whole
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, there’s a way. Add a command button which says “export”.
Then, in the
export()method, iterate over theList<Something>which you’re displaying there in the<ui:repeat>and print each row/column in valid CSV format. The CSV format rules are very simple, there are only 3:So it’ll look something like this: