{"id":1534,"date":"2012-07-13T22:00:00","date_gmt":"2012-07-13T22:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/jasperreports-jsf-plugin-use-cases-simple-list-report.html"},"modified":"2015-02-17T17:41:25","modified_gmt":"2015-02-17T15:41:25","slug":"jasperreports-jsf-plugin-use-cases-2","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html","title":{"rendered":"JasperReports JSF Plugin Use Cases &#8211; Simple List Report"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">This is the first <i>\u201cuse case article\u201d<\/i> of the <a href=\"http:\/\/codenibbles.wordpress.com\/2012\/03\/26\/jasperreports-jsf-plugin-use-cases-series\/\" title=\"Series intro\">JasperReports JSF Plugin Series<\/a> and I will focus on a simple requirement and I will get deeper in further ones. The starting point is the project setup that we have already done for our book store and I will add to it a list with the different books registered in our database and that list will be available as a report as well.       <\/p>\n<p>Our application will offer with following features when showing reports to the user:       <\/p>\n<ul>\n<li>User will be able to select the output format of the report.<\/li>\n<li>The report view will be localizable and will be output in the same locale that the user of the application has.<\/li>\n<\/ul>\n<p><strong>Initial Setup<\/strong>      <\/p>\n<p>To avoid creating all the CRUD functionally I will initialize the table that will contain the values to be shown using a SQL script for the sake of simplicity. Just a few records should be enough to the purpose of this article and thus, I will use following script to feed the book table:       <\/p>\n<pre class=\"brush:java\">insert into book(title, author, published_year, genre, price)\r\n    values('The Futurogical Congress', 'Stanislaw Lem', '1978', 'SciFi', 2.5);\r\ninsert into book(title, author, published_year, genre, price)\r\n    values('Brave New World', 'H. G. Wells', '1975', 'SciFi', 3.99);\r\ninsert into book(title, author, published_year, genre, price)\r\n    values('Treasure Island', 'Robert Lewis Stevenson', '1948', 'Adventures', 4.45);\r\ninsert into book(title, author, published_year, genre, price)\r\n    values('The Lord of the Rings', 'J. R. Tolkien', '1945', 'Fantasy', 12.23);\r\ninsert into book(title, author, published_year, genre, price)\r\n    values('In Cold Blood', 'Truman Capote', '1966', 'Nonfiction', 9.50);\r\n<\/pre>\n<p>I will create a resource bundle that will hold the localised texts for the view and the report. The name of the file will be <tt>Messages.properties<\/tt> and I will add it to the package <tt>net.sf.jasperreports.jsf.sample.usecases<\/tt> under the resources root folder. File contents will be as follows:       <\/p>\n<pre class=\"brush:bash\">report.format.select=Select report format\r\n\r\nbookList.pageTitle=Browsing Books\r\nbookList.id=Reference ID\r\nbookList.title=Title\r\nbookList.author=Author\r\nbookList.genre=Genre\r\nbookList.year=Year\r\nbookList.price=Price\r\n<\/pre>\n<p>I added another file like the previous one but named <tt>Messages_es.properties<\/tt> and holding the Spanish translation, you can add your additional preferred languages if interested in support more than one. Previous resource file must be configured in our <tt>faces-config.xml<\/tt> file:       <\/p>\n<pre class=\"brush:xml\">&lt;faces-config ...&gt;\r\n    &lt;application&gt;\r\n        &lt;locale-config&gt;\r\n            &lt;default-locale&gt;en&lt;\/default-locale&gt;\r\n            &lt;supported-locale&gt;es&lt;\/supported-locale&gt;\r\n        &lt;\/locale-config&gt;\r\n        &lt;resource-bundle&gt;\r\n            &lt;var&gt;Messages&lt;\/var&gt;\r\n            &lt;base-name&gt;net.sf.jasperreports.jsf.sample.usecases.Messages&lt;\/base-name&gt;\r\n        &lt;\/resource-bundle&gt;\r\n    &lt;\/application&gt;\r\n&lt;\/faces-config&gt;\r\n<\/pre>\n<p>Since I\u2019m using Maven I will configure a folder inside my project structure to hold the reports\u2019 <tt>.jrxml<\/tt> files and configure my POM to run the JasperReports compiler against that folder. The folder name I chose is <tt>src\/main\/jasperreports<\/tt> and the POM configuration for the <a href=\"http:\/\/mojo.codehaus.org\/jasperreports-maven-plugin\/\" target=\"_blank\" title=\"Maven JasperReports Plugin\">JasperReports Maven Plugin<\/a> is as follows:       <\/p>\n<pre class=\"brush:xml\">&lt;plugin&gt;\r\n  &lt;groupId&gt;org.codehaus.mojo&lt;\/groupId&gt;\r\n  &lt;artifactId&gt;jasperreports-maven-plugin&lt;\/artifactId&gt;\r\n  &lt;version&gt;1.0-beta-2&lt;\/version&gt;\r\n  &lt;executions&gt;\r\n    &lt;execution&gt;\r\n      &lt;goals&gt;\r\n        &lt;goal&gt;compile-reports&lt;\/goal&gt;\r\n      &lt;\/goals&gt;\r\n    &lt;\/execution&gt;\r\n  &lt;\/executions&gt;\r\n  &lt;configuration&gt;\r\n    &lt;outputDirectory&gt;target\/jasperreports\/jasper&lt;\/outputDirectory&gt;\r\n  &lt;\/configuration&gt;\r\n  &lt;dependencies&gt;\r\n    &lt;dependency&gt;\r\n      &lt;groupId&gt;net.sf.jasperreports&lt;\/groupId&gt;\r\n      &lt;artifactId&gt;jasperreports&lt;\/artifactId&gt;\r\n      &lt;version&gt;4.5.1&lt;\/version&gt;\r\n    &lt;\/dependency&gt;\r\n  &lt;\/dependencies&gt;\r\n&lt;\/plugin&gt;\r\n<\/pre>\n<p>I will also add some extra configuration to the Maven WAR Plugin so it can collect all the <tt>.jasper<\/tt> files generated by the JasperReports compiler and pack them inside the application WAR file:       <\/p>\n<pre class=\"brush:xml\">&lt;plugin&gt;\r\n  &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n  &lt;artifactId&gt;maven-war-plugin&lt;\/artifactId&gt;\r\n  &lt;version&gt;2.2&lt;\/version&gt;\r\n  &lt;configuration&gt;\r\n    &lt;webResources&gt;\r\n      &lt;resource&gt;\r\n        &lt;directory&gt;src\/main\/jasperreports&lt;\/directory&gt;\r\n        &lt;includes&gt;\r\n          &lt;include&gt;**\/*.jrxml&lt;\/include&gt;\r\n        &lt;\/includes&gt;\r\n        &lt;targetPath&gt;resources\/reports\/sources&lt;\/targetPath&gt;\r\n      &lt;\/resource&gt;\r\n      &lt;resource&gt;\r\n        &lt;directory&gt;target\/jasperreports\/jasper&lt;\/directory&gt;\r\n        &lt;includes&gt;\r\n          &lt;include&gt;**\/*.jasper&lt;\/include&gt;\r\n        &lt;\/includes&gt;\r\n        &lt;targetPath&gt;resources\/reports\/jasper&lt;\/targetPath&gt;\r\n      &lt;\/resource&gt;\r\n    &lt;\/webResources&gt;\r\n  &lt;\/configuration&gt;\r\n&lt;\/plugin&gt;\r\n<\/pre>\n<p>As you may notice, I\u2019m packaging the JasperReports\u2019 <tt>.jrxml<\/tt> files inside the web application archive. When using the plugin we can reference either as the report template resource, the plugin engine is smart enough to recognise the type of file referenced and when using a reference to a report source file the plugin will compile the report on the fly. However, the preferred approach should be always to use a <tt>.jasper<\/tt> file as it has better performance than the other one.       <strong>&nbsp;<\/strong><\/p>\n<p><strong>Design the Report Template<\/strong>      <\/p>\n<p>As stated in the intro to this series, the visual design tool for JasperReports I will be using is iReport, there are a lot of tutorials out there about how to use iReport so I will skip that part. However, since I want to design a locale-aware report I must pay attention to the <a href=\"http:\/\/jasperforge.org\/uploads\/publish\/jasperreportswebsite\/trunk\/sample.reference\/i18n\/index.html\" title=\"JasperReports i18n Sample\">I18n Sample<\/a> provided at JasperReports\u2019 web site.       <\/p>\n<p>So, we start iReport and select a blank report template. Since our report will use a SQL based data source, once the visual designer has finished loading we must configure the SQL sentence that will grab the data from the database. To do that we must click on the button at the left of the zoom options in the designer view and select the \u201cReport query\u201d tab:<br \/>\n<a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report1.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report1-300x190.png\" alt=\"jasperreports-jsf-plugin-use-cases-simple-list-report1\" width=\"300\" height=\"190\" class=\"aligncenter size-medium wp-image-37293\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report1-300x190.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report1.png 915w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nThe SQL query I will use to grab the data is the most simple one we can do. After inputting that SQL sentence iReport will show us all the available fields in the lower part of the window. If it could load all the fields without any errors then click the OK button to save them to report:       <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:java\">select * from book;\r\n<\/pre>\n<p>All the text that will be outputted in my final report will come from either a resource bundle or the database itself. So, as the JasperReports i18n sample points out, we should use text fields wherever we want to output some text. The report design view will look something like following picture:       <\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report2.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report2-300x124.png\" alt=\"jasperreports-jsf-plugin-use-cases-simple-list-report2\" width=\"300\" height=\"124\" class=\"aligncenter size-medium wp-image-37294\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report2-300x124.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report2.png 907w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nThe XML view of the report template file will be something like the following:       <\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;jasperReport xmlns=\"http:\/\/jasperreports.sourceforge.net\/jasperreports\"\r\n              xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n              xsi:schemaLocation=\"http:\/\/jasperreports.sourceforge.net\/jasperreports http:\/\/jasperreports.sourceforge.net\/xsd\/jasperreport.xsd\"\r\n              name=\"booklist\" pageWidth=\"595\" pageHeight=\"842\" columnWidth=\"555\" leftMargin=\"20\" rightMargin=\"20\"\r\n              topMargin=\"20\" bottomMargin=\"20\"&gt;\r\n    &lt;property name=\"ireport.zoom\" value=\"1.5\"\/&gt;\r\n    &lt;property name=\"ireport.x\" value=\"0\"\/&gt;\r\n    &lt;property name=\"ireport.y\" value=\"0\"\/&gt;\r\n    &lt;queryString&gt;\r\n        &lt;![CDATA[select * from book]]&gt;\r\n    &lt;\/queryString&gt;\r\n    &lt;field name=\"BOOK_ID\" class=\"java.lang.Integer\"\/&gt;\r\n    &lt;field name=\"TITLE\" class=\"java.lang.String\"\/&gt;\r\n    &lt;field name=\"AUTHOR\" class=\"java.lang.String\"\/&gt;\r\n    &lt;field name=\"PUBLISHED_YEAR\" class=\"java.lang.String\"\/&gt;\r\n    &lt;field name=\"GENRE\" class=\"java.lang.String\"\/&gt;\r\n    &lt;field name=\"PRICE\" class=\"java.math.BigDecimal\"\/&gt;\r\n    &lt;background&gt;\r\n        &lt;band splitType=\"Stretch\"\/&gt;\r\n    &lt;\/background&gt;\r\n    &lt;title&gt;\r\n        &lt;band height=\"38\" splitType=\"Stretch\"&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"0\" y=\"0\" width=\"227\" height=\"29\"\/&gt;\r\n                &lt;textElement&gt;\r\n                    &lt;font size=\"18\" isBold=\"true\"\/&gt;\r\n                &lt;\/textElement&gt;\r\n                &lt;textFieldExpression&gt;&lt;![CDATA[$R{bookList.pageTitle}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n        &lt;\/band&gt;\r\n    &lt;\/title&gt;\r\n    &lt;columnHeader&gt;\r\n        &lt;band height=\"27\" splitType=\"Stretch\"&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"0\" y=\"0\" width=\"100\" height=\"20\"\/&gt;\r\n                &lt;textElement&gt;\r\n                    &lt;font isBold=\"true\"\/&gt;\r\n                &lt;\/textElement&gt;\r\n                &lt;textFieldExpression&gt;&lt;![CDATA[$R{bookList.id}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"113\" y=\"2\" width=\"155\" height=\"20\"\/&gt;\r\n                &lt;textElement&gt;\r\n                    &lt;font isBold=\"true\"\/&gt;\r\n                &lt;\/textElement&gt;\r\n                &lt;textFieldExpression&gt;&lt;![CDATA[$R{bookList.title}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"285\" y=\"2\" width=\"100\" height=\"20\"\/&gt;\r\n                &lt;textElement&gt;\r\n                    &lt;font isBold=\"true\"\/&gt;\r\n                &lt;\/textElement&gt;\r\n                &lt;textFieldExpression&gt;&lt;![CDATA[$R{bookList.author}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"398\" y=\"2\" width=\"100\" height=\"20\"\/&gt;\r\n                &lt;textElement&gt;\r\n                    &lt;font isBold=\"true\"\/&gt;\r\n                &lt;\/textElement&gt;\r\n                &lt;textFieldExpression&gt;&lt;![CDATA[$R{bookList.year}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n        &lt;\/band&gt;\r\n    &lt;\/columnHeader&gt;\r\n    &lt;detail&gt;\r\n        &lt;band height=\"21\" splitType=\"Stretch\"&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"0\" y=\"0\" width=\"100\" height=\"20\"\/&gt;\r\n                &lt;textElement\/&gt;\r\n                &lt;textFieldExpression class=\"java.lang.Integer\"&gt;&lt;![CDATA[$F{BOOK_ID}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"113\" y=\"0\" width=\"155\" height=\"20\"\/&gt;\r\n                &lt;textElement\/&gt;\r\n                &lt;textFieldExpression&gt;&lt;![CDATA[$F{TITLE}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"285\" y=\"0\" width=\"100\" height=\"20\"\/&gt;\r\n                &lt;textElement\/&gt;\r\n                &lt;textFieldExpression&gt;&lt;![CDATA[$F{AUTHOR}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"398\" y=\"0\" width=\"112\" height=\"20\"\/&gt;\r\n                &lt;textElement\/&gt;\r\n                &lt;textFieldExpression&gt;&lt;![CDATA[$F{PUBLISHED_YEAR}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n        &lt;\/band&gt;\r\n    &lt;\/detail&gt;\r\n    &lt;columnFooter&gt;\r\n        &lt;band height=\"45\" splitType=\"Stretch\"\/&gt;\r\n    &lt;\/columnFooter&gt;\r\n    &lt;pageFooter&gt;\r\n        &lt;band height=\"25\" splitType=\"Stretch\"&gt;\r\n            &lt;textField&gt;\r\n                &lt;reportElement x=\"227\" y=\"0\" width=\"100\" height=\"20\"\/&gt;\r\n                &lt;textElement textAlignment=\"Center\"\/&gt;\r\n                &lt;textFieldExpression class=\"java.lang.Integer\"&gt;&lt;![CDATA[$V{PAGE_NUMBER}]]&gt;&lt;\/textFieldExpression&gt;\r\n            &lt;\/textField&gt;\r\n        &lt;\/band&gt;\r\n    &lt;\/pageFooter&gt;\r\n    &lt;summary&gt;\r\n        &lt;band height=\"42\" splitType=\"Stretch\"\/&gt;\r\n    &lt;\/summary&gt;\r\n&lt;\/jasperReport&gt;\r\n<\/pre>\n<p>Save this file inside the <tt>src\/main\/jasperreports<\/tt> folder created earlier and you are ready for the next section. <\/p>\n<p><strong>Design the JSF View<\/strong>      <\/p>\n<p>Our JSF View will based in <a href=\"http:\/\/facelets.java.net\/\" target=\"_blank\" title=\"Facelets Home Page\">Facelets<\/a>, so it will be written as a XHTML file in which we need to declare the different library namespaces that we will be using. For instructions how to setup Facelets go straight to its <a href=\"http:\/\/facelets.java.net\/nonav\/docs\/dev\/docbook.html\" target=\"_blank\" title=\"Facelets Documentation\">documentation<\/a> (JSF 2.x applications support Facelets out-of-the-box without additional configuration).       <\/p>\n<p>The following snippet shows the contents of the Facelets\u2019 template I will use to render the user interface for the book list. Copy it and save it in a file inside your web application content files. The file name I will use is <tt>\/book\/bookList.xhtml<\/tt>:       <\/p>\n<pre class=\"brush:xml\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n\r\n&lt;!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd\"&gt;\r\n&lt;html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"\r\n      xmlns:f=\"http:\/\/java.sun.com\/jsf\/core\"\r\n      xmlns:h=\"http:\/\/java.sun.com\/jsf\/html\"\r\n      xmlns:jr=\"http:\/\/jasperreportjsf.sf.net\/tld\/jasperreports-jsf-1_3.tld\"&gt;\r\n&lt;head&gt;\r\n    &lt;title&gt;Book List - JasperReports JSF Use Cases&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;&lt;h:outputText value=\"#{Messages['bookList.pageTitle']}\"\/&gt;&lt;\/h1&gt;\r\n\r\n&lt;div&gt;\r\n    &lt;h:form id=\"bookListForm\"&gt;\r\n        &lt;jr:source id=\"bookSource\" type=\"jndi\" value=\"java:comp\/env\/jdbc\/BookStoreDB\"\/&gt;\r\n\r\n        &lt;h:panelGrid columns=\"3\"&gt;\r\n            &lt;h:outputLabel for=\"reportFormat\" value=\"#{Messages['report.format.select']}\" \/&gt;\r\n            &lt;h:selectOneMenu id=\"reportFormat\" value=\"#{bookList.reportFormat}\"\r\n                             onchange=\"document.bookListForm.submit();\"&gt;\r\n                &lt;f:selectItems value=\"#{bookList.reportFormats}\" \/&gt;\r\n            &lt;\/h:selectOneMenu&gt;\r\n            &lt;jr:reportLink id=\"reportLink\" format=\"#{bookList.reportFormat}\"\r\n                           target=\"blank\" source=\"bookSource\"\r\n                           value=\"\/resources\/reports\/jasper\/booklist.jasper\"\r\n                           resourceBundle=\"#{Messages}\"&gt;\r\n                &lt;h:outputText value=\"#{Messages['bookList.action.show']}\"\/&gt;\r\n            &lt;\/jr:reportLink&gt;\r\n        &lt;\/h:panelGrid&gt;\r\n\r\n        &lt;h:dataTable value=\"#{bookList.allBooks}\" var=\"book\"&gt;\r\n            &lt;h:column&gt;\r\n                &lt;f:facet name=\"header\"&gt;\r\n                    &lt;h:outputText value=\"#{Messages['bookList.title']}\"\/&gt;\r\n                &lt;\/f:facet&gt;\r\n                &lt;h:outputText value=\"#{book.title}\"\/&gt;\r\n            &lt;\/h:column&gt;\r\n            &lt;h:column&gt;\r\n                &lt;f:facet name=\"header\"&gt;\r\n                    &lt;h:outputText value=\"#{Messages['bookList.author']}\"\/&gt;\r\n                &lt;\/f:facet&gt;\r\n                &lt;h:outputText value=\"#{book.author}\"\/&gt;\r\n            &lt;\/h:column&gt;\r\n            &lt;h:column&gt;\r\n                &lt;f:facet name=\"header\"&gt;\r\n                    &lt;h:outputText value=\"#{Messages['bookList.year']}\"\/&gt;\r\n                &lt;\/f:facet&gt;\r\n                &lt;h:outputText value=\"#{book.publishedYear}\"\/&gt;\r\n            &lt;\/h:column&gt;\r\n            &lt;h:column&gt;\r\n                &lt;f:facet name=\"header\"&gt;\r\n                    &lt;h:outputText value=\"#{Messages['bookList.genre']}\"\/&gt;\r\n                &lt;\/f:facet&gt;\r\n                &lt;h:outputText value=\"#{book.genre}\"\/&gt;\r\n            &lt;\/h:column&gt;\r\n        &lt;\/h:dataTable&gt;\r\n    &lt;\/h:form&gt;\r\n&lt;\/div&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>The highlighted lines are where we are adding the JasperReports JSF Plugin components:                             <\/p>\n<ul>\n<li>First of all, at line 14, we are defining a Report Source Component by means of the <tt>&lt;jr:source&gt;<\/tt> tag. This component will not output any data to the rendered HTML but can be referenced by the visual components of the library as way of telling them how to obtain the data they need to render the report contents.<\/li>\n<li>From line 21 to 26 we are defining a Report Link Component by means of the <tt>&lt;jr:reportLink&gt;<\/tt> tag. This component will output a standard <tt>a<\/tt> HTML element pointing to a special URL generated by the plugin\u2019s engine. When clicked on it the plugin\u2019s engine will intercept that URL and replace some of the JSF life-cycle phases to process the report data and generate a result. Notice that the report component has an attribute <tt>resourceBundle<\/tt> pointing to the messages bundle we have created in the first section.<\/li>\n<\/ul>\n<p><i><strong>Note<\/strong>: The <tt>resourceBundle<\/tt> attribute has made available in the trunk version (at the moment of writing this lines) of JasperReports JSF Plugin, which uses the 1.3 version of the tag library. For users that are still using the 1.2 version of the tag library they can get a similar result adding a parameter to the report link:<\/i>      <\/p>\n<pre class=\"brush:xml\">&lt;jr:reportLink id=\"reportLink\" format=\"#{bookList.reportFormat}\"\r\n               target=\"blank\" source=\"bookSource\"\r\n               value=\"\/resources\/reports\/jasper\/booklist.jasper\"&gt;\r\n    &lt;f:param name=\"RESOURCE_BUNDLE\" value=\"#{Messages}\" \/&gt;\r\n    &lt;h:outputText value=\"#{Messages['bookList.action.show']}\"\/&gt;\r\n&lt;\/jr:reportLink&gt;\r\n<\/pre>\n<p>Apart from the highlighted lines, I added code to render a combo box with all the export options supported by JasperReports JSF Plugin and a data table that will layout the different records for the table books.       <\/p>\n<p><i><strong>Note<\/strong>: The combo box contains an <tt>onchange<\/tt> attribute intended to submit the form with the new value for the report export option. I must done it that way to get the report link properly working in JSF prior to version 2.x as that versions do not have any AJAX support.<\/i>      <\/p>\n<p>The JSF view shown above needs a managed bean to work, that managed bean will be providing the values to the user interface:       <\/p>\n<pre class=\"brush:java\">public class BookListView {\r\n\r\n    private BookManager bookManager;\r\n\r\n    private List allBooks;\r\n\r\n    private String reportFormat = &amp;quot;pdf&amp;quot;;\r\n\r\n    public void setBookManager(BookManager bookManager) {\r\n        this.bookManager = bookManager;\r\n    }\r\n\r\n    public List getAllBooks() {\r\n        if (allBooks == null) {\r\n            allBooks = bookManager.getAllBooks();\r\n        }\r\n        return allBooks;\r\n    }\r\n\r\n    public String getReportFormat() {\r\n        return reportFormat;\r\n    }\r\n\r\n    public void setReportFormat(String reportFormat) {\r\n        this.reportFormat = reportFormat;\r\n    }\r\n\r\n    public List getReportFormats() {\r\n        FacesContext context = FacesContext.getCurrentInstance();\r\n        JRFacesContext jrContext = JRFacesContext.getInstance(context);\r\n        List list = new ArrayList();\r\n        for (String format : jrContext.getAvailableExportFormats()) {\r\n            list.add(new SelectItem(format, format));\r\n        }\r\n        return list;\r\n    }\r\n\r\n}\r\n<\/pre>\n<p>The <tt>bookManager<\/tt> field is a reference to an interface that will provide with the logic to fetch all the books from the database:       <\/p>\n<pre class=\"brush:java\">public interface BookManager {\r\n    public List getAllBooks();\r\n}\r\n<\/pre>\n<p>As said in the introduction article to this series, I will not get into the details of additional classes or interfaces needed to implement the use case as it\u2019s up each specific user to decide what framework will be providing the skeleton of the application.       <strong>&nbsp;<\/strong><\/p>\n<p><strong>Testing All Together<\/strong>      <\/p>\n<p>It\u2019s time to check that everything works as it should. So, let\u2019s package our web application, deploy it on our Tomcat server and enter the following URL into your preferred browser: <tt>http:\/\/localhost:8080\/jrjsf-usecases\/book\/bookList.jsf<\/tt>.       <\/p>\n<p><i><strong>Note<\/strong>: The Derby (database) and Tomcat (app server) must be running before performing the deploy operation.<\/i>      <\/p>\n<p>So, this is how it should look when our browser outputs the contents of the previous mentioned URL:       <\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report3.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report3-300x104.png\" alt=\"jasperreports-jsf-plugin-use-cases-simple-list-report3\" width=\"300\" height=\"104\" class=\"aligncenter size-medium wp-image-37295\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report3-300x104.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report3.png 751w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nNow, click on the <i>\u201cShow Report\u201d<\/i> link to see the outputs of the report filled with the strings from our resource bundle and the data from the database:       <\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report4.png\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report4-300x110.png\" alt=\"jasperreports-jsf-plugin-use-cases-simple-list-report4\" width=\"300\" height=\"110\" class=\"aligncenter size-medium wp-image-37296\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report4-300x110.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report4-1024x374.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report4-600x220.png 600w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/07\/jasperreports-jsf-plugin-use-cases-simple-list-report4.png 1425w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nThat is a sample screenshot taken from the PDF view of the report. Use the combo box in the user interface to change the report export format.<\/p>\n<p><strong>Conclusion<\/strong>      <\/p>\n<p>So, all done, this is the simplest way of adding a report to our JavaServer Faces application. I started with a simple sample and I will be adding more complex features to it from time to time. Hope you enjoyed this article and come back for the future publications, the good stuff is yet to come! <\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/www.codenibbles.com\/blog\/2012\/04\/02\/jasperreports-jsf-plugin-use-cases-simple-list-report\/#.T_--8vU4rnk\">JasperReports JSF Plugin Use Cases \u2013 Simple List Report <\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Alonso Dominguez at the <a href=\"http:\/\/www.codenibbles.com\/blog\/\">Code Nibbles<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This is the first \u201cuse case article\u201d of the JasperReports JSF Plugin Series and I will focus on a simple requirement and I will get deeper in further ones. The starting point is the project setup that we have already done for our book store and I will add to it a list with the &hellip;<\/p>\n","protected":false},"author":235,"featured_media":145,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[175,198],"class_list":["post-1534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-jaspersoft-jasperreports","tag-jsp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JasperReports JSF Plugin Use Cases - Simple List Report - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"This is the first \u201cuse case article\u201d of the JasperReports JSF Plugin Series and I will focus on a simple requirement and I will get deeper in further\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JasperReports JSF Plugin Use Cases - Simple List Report - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"This is the first \u201cuse case article\u201d of the JasperReports JSF Plugin Series and I will focus on a simple requirement and I will get deeper in further\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-07-13T22:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-02-17T15:41:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jaspersoft-jasperreports-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alonso Dominguez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alonso Dominguez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html\"},\"author\":{\"name\":\"Alonso Dominguez\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5ba4ef7ccb5136e958e7dcd2e3997392\"},\"headline\":\"JasperReports JSF Plugin Use Cases &#8211; Simple List Report\",\"datePublished\":\"2012-07-13T22:00:00+00:00\",\"dateModified\":\"2015-02-17T15:41:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html\"},\"wordCount\":1430,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jaspersoft-jasperreports-logo.jpg\",\"keywords\":[\"Jaspersoft JasperReports\",\"JSP\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html\",\"name\":\"JasperReports JSF Plugin Use Cases - Simple List Report - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jaspersoft-jasperreports-logo.jpg\",\"datePublished\":\"2012-07-13T22:00:00+00:00\",\"dateModified\":\"2015-02-17T15:41:25+00:00\",\"description\":\"This is the first \u201cuse case article\u201d of the JasperReports JSF Plugin Series and I will focus on a simple requirement and I will get deeper in further\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jaspersoft-jasperreports-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jaspersoft-jasperreports-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/07\\\/jasperreports-jsf-plugin-use-cases-2.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"JasperReports JSF Plugin Use Cases &#8211; Simple List Report\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5ba4ef7ccb5136e958e7dcd2e3997392\",\"name\":\"Alonso Dominguez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/00f0566a7e46e8497d97e80199dd2c4cb318cb25503678b98ec13dd847bafd9c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/00f0566a7e46e8497d97e80199dd2c4cb318cb25503678b98ec13dd847bafd9c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/00f0566a7e46e8497d97e80199dd2c4cb318cb25503678b98ec13dd847bafd9c?s=96&d=mm&r=g\",\"caption\":\"Alonso Dominguez\"},\"sameAs\":[\"http:\\\/\\\/www.codenibbles.com\\\/blog\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Alonso-Dominguez\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JasperReports JSF Plugin Use Cases - Simple List Report - Java Code Geeks","description":"This is the first \u201cuse case article\u201d of the JasperReports JSF Plugin Series and I will focus on a simple requirement and I will get deeper in further","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html","og_locale":"en_US","og_type":"article","og_title":"JasperReports JSF Plugin Use Cases - Simple List Report - Java Code Geeks","og_description":"This is the first \u201cuse case article\u201d of the JasperReports JSF Plugin Series and I will focus on a simple requirement and I will get deeper in further","og_url":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-07-13T22:00:00+00:00","article_modified_time":"2015-02-17T15:41:25+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jaspersoft-jasperreports-logo.jpg","type":"image\/jpeg"}],"author":"Alonso Dominguez","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Alonso Dominguez","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html"},"author":{"name":"Alonso Dominguez","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5ba4ef7ccb5136e958e7dcd2e3997392"},"headline":"JasperReports JSF Plugin Use Cases &#8211; Simple List Report","datePublished":"2012-07-13T22:00:00+00:00","dateModified":"2015-02-17T15:41:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html"},"wordCount":1430,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jaspersoft-jasperreports-logo.jpg","keywords":["Jaspersoft JasperReports","JSP"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html","url":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html","name":"JasperReports JSF Plugin Use Cases - Simple List Report - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jaspersoft-jasperreports-logo.jpg","datePublished":"2012-07-13T22:00:00+00:00","dateModified":"2015-02-17T15:41:25+00:00","description":"This is the first \u201cuse case article\u201d of the JasperReports JSF Plugin Series and I will focus on a simple requirement and I will get deeper in further","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jaspersoft-jasperreports-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jaspersoft-jasperreports-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/07\/jasperreports-jsf-plugin-use-cases-2.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"JasperReports JSF Plugin Use Cases &#8211; Simple List Report"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5ba4ef7ccb5136e958e7dcd2e3997392","name":"Alonso Dominguez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/00f0566a7e46e8497d97e80199dd2c4cb318cb25503678b98ec13dd847bafd9c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/00f0566a7e46e8497d97e80199dd2c4cb318cb25503678b98ec13dd847bafd9c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/00f0566a7e46e8497d97e80199dd2c4cb318cb25503678b98ec13dd847bafd9c?s=96&d=mm&r=g","caption":"Alonso Dominguez"},"sameAs":["http:\/\/www.codenibbles.com\/blog\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Alonso-Dominguez"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/235"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1534"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1534\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/145"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}