{"id":225,"date":"2014-10-24T15:14:52","date_gmt":"2014-10-24T14:14:52","guid":{"rendered":"http:\/\/elstarit.nl\/?p=225"},"modified":"2014-10-24T15:15:49","modified_gmt":"2014-10-24T14:15:49","slug":"first-steps-jsf-2-0-world","status":"publish","type":"post","link":"https:\/\/elstarit.nl\/?p=225","title":{"rendered":"My steps in the JSF 2.0 world"},"content":{"rendered":"<p>The last 2 weeks were very interesting, starting at a new customer as a Java developer on a JSF2.0 project.<\/p>\n<p>XPages are based on highly customised version of JSF 1.1 at the base.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Annotations<\/strong><\/p>\n<p>The big advantage if JSF 2.0 is build in of Annotations. Very useful, like the @Formulas back, in my case, in the old days of Lotus Notes development.<\/p>\n<p>For\u00a0Managed Bean you can still use the faces-config.xml to control them. But now there is also the @ManagedBean(name=&#8221;fooBean&#8221;), you can use directly in the Java Class in combination with Scope Annotation, @ViewScoped, @RequestScope or @ApplicationScope.<\/p>\n<p>Keep in mind that if you register also the Managed Bean in the faces-config.xml, this registration will overrule the @ManagedBean annotation on the Class.<\/p>\n<p>Related to @ManagedBean, there is also @ManagedProperty annotation. Which can be used to directly include a Managed Bean inside the Java class. @ManagedProperty has one required parameter, &#8216;value&#8217;, which refer to the Managed Bean name. Inside the Java class you can automatically use the Managed Property.<\/p>\n<p>Spring Framework uses the @Inject annotation to inject objects inside the Java class<\/p>\n<p>&nbsp;<\/p>\n<p>Another very useful Annotation is @PostConstruct above a method inside a Java class, as the name suggest it will run as the Managed Bean will be instantiated. There is no need to trigger such a method from within a XPages or some other way.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Expression Language\u00a0<\/strong><\/p>\n<p>It is still there and as in XPages very powerful, but in JSF2.0 you not can call getters and setters in a bean, like #{bean.property1}, but also methods, like #{bean.method(argument)}<\/p>\n<p>&nbsp;<\/p>\n<p><strong>ProjectStage<\/strong><\/p>\n<p>In JSF 2.0, in perception, there is new thing, ProjectStage. In the web.xml you can put a tag to specify the current ProjectStage.<\/p>\n<p>[dropshadowbox align=&#8221;none&#8221; effect=&#8221;lifted-both&#8221; width=&#8221;400px&#8221; height=&#8221;&#8221; background_color=&#8221;#ffffff&#8221; border_width=&#8221;1&#8243; border_color=&#8221;#dddddd&#8221; ]<a href=\"http:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-226\" src=\"http:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png\" alt=\"ProjectStage\" width=\"926\" height=\"126\" srcset=\"https:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png 926w, https:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14-300x40.png 300w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/a>[\/dropshadowbox]<\/p>\n<p>The most used values are Development and Production, but there is also something like UnitTest and SystemTest. When you use Development the Application Server will print more debug and log lines to the console, very useful.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Frameworks.<\/strong><\/p>\n<p>XPages has the excellent Extension Library as framework and toolbox for lots of component, UI and behind the scenes. JSF 2.0 has their frameworks.<\/p>\n<p>Till now I am using <a href=\"http:\/\/www.primefaces.org\/showcase\/\" target=\"_blank\">PrimeFaces<\/a> and <a href=\"http:\/\/example.irian.at\/myfacesexamples\/home.jsf\" target=\"_blank\">MyFaces Tomahawk<\/a>, they are not exclusive for JSF2.0 and higher. But when you look at older versions, there is a lack of functionality.<\/p>\n<p>The 2 frameworks contains lots of components which can be easily integrated inside your application. As specially PrimeFaces has lots code\u00a0examples.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>and more&#8230;.non JSF<\/strong><\/p>\n<p>In my project next to JSF, I also use EJB and JPA to set up Persistence to the Oracle Database. With Persistence in place you can easily do CRUD actions on objects in the Relational Database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The last 2 weeks were very interesting, starting at a new customer as a Java developer on a JSF2.0 project. XPages are based on highly customised version of JSF 1.1 at the base. &nbsp; Annotations The big advantage if JSF 2.0 is build in of Annotations. Very useful, like the @Formulas back, in my case, <a class=\"read-more\" href=\"https:\/\/elstarit.nl\/?p=225\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[2],"tags":[50,49,3,48],"class_list":["post-225","post","type-post","status-publish","format-standard","hentry","category-development","tag-annotations","tag-expression-language","tag-java","tag-jsf2-0"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>My steps in the JSF 2.0 world - elstar IT<\/title>\n<meta name=\"description\" content=\"About my first 2 weeks at a new customer on a JSF 2.0 project\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/elstarit.nl\/?p=225\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"My steps in the JSF 2.0 world - elstar IT\" \/>\n<meta property=\"og:description\" content=\"About my first 2 weeks at a new customer on a JSF 2.0 project\" \/>\n<meta property=\"og:url\" content=\"https:\/\/elstarit.nl\/?p=225\" \/>\n<meta property=\"og:site_name\" content=\"elstar IT\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-24T14:14:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-10-24T14:15:49+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png\" \/>\n<meta name=\"author\" content=\"flinden68\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"flinden68\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225\"},\"author\":{\"name\":\"flinden68\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#\\\/schema\\\/person\\\/426456e816ad57bf411d5d2bb9768935\"},\"headline\":\"My steps in the JSF 2.0 world\",\"datePublished\":\"2014-10-24T14:14:52+00:00\",\"dateModified\":\"2014-10-24T14:15:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225\"},\"wordCount\":465,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/elstarit.nl\\\/wp-content\\\/uploads\\\/2014\\\/10\\\/Screen-Shot-2014-10-24-at-15.59.14.png\",\"keywords\":[\"Annotations\",\"Expression Language\",\"java\",\"jsf2.0\"],\"articleSection\":[\"development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/elstarit.nl\\\/?p=225#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225\",\"url\":\"https:\\\/\\\/elstarit.nl\\\/?p=225\",\"name\":\"My steps in the JSF 2.0 world - elstar IT\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/elstarit.nl\\\/wp-content\\\/uploads\\\/2014\\\/10\\\/Screen-Shot-2014-10-24-at-15.59.14.png\",\"datePublished\":\"2014-10-24T14:14:52+00:00\",\"dateModified\":\"2014-10-24T14:15:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#\\\/schema\\\/person\\\/426456e816ad57bf411d5d2bb9768935\"},\"description\":\"About my first 2 weeks at a new customer on a JSF 2.0 project\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/elstarit.nl\\\/?p=225\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225#primaryimage\",\"url\":\"http:\\\/\\\/elstarit.nl\\\/wp-content\\\/uploads\\\/2014\\\/10\\\/Screen-Shot-2014-10-24-at-15.59.14.png\",\"contentUrl\":\"http:\\\/\\\/elstarit.nl\\\/wp-content\\\/uploads\\\/2014\\\/10\\\/Screen-Shot-2014-10-24-at-15.59.14.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/?p=225#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/elstarit.nl\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"development\",\"item\":\"https:\\\/\\\/elstarit.nl\\\/?cat=2\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"My steps in the JSF 2.0 world\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#website\",\"url\":\"https:\\\/\\\/elstarit.nl\\\/\",\"name\":\"elstar IT\",\"description\":\"Fullstack | Java | Tech Speaker | Tech Coach | Frank van der Linden\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/elstarit.nl\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/elstarit.nl\\\/#\\\/schema\\\/person\\\/426456e816ad57bf411d5d2bb9768935\",\"name\":\"flinden68\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g\",\"caption\":\"flinden68\"},\"sameAs\":[\"http:\\\/\\\/www.elstarit.nl\",\"https:\\\/\\\/x.com\\\/elstarit\"],\"url\":\"https:\\\/\\\/elstarit.nl\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"My steps in the JSF 2.0 world - elstar IT","description":"About my first 2 weeks at a new customer on a JSF 2.0 project","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:\/\/elstarit.nl\/?p=225","og_locale":"en_US","og_type":"article","og_title":"My steps in the JSF 2.0 world - elstar IT","og_description":"About my first 2 weeks at a new customer on a JSF 2.0 project","og_url":"https:\/\/elstarit.nl\/?p=225","og_site_name":"elstar IT","article_published_time":"2014-10-24T14:14:52+00:00","article_modified_time":"2014-10-24T14:15:49+00:00","og_image":[{"url":"http:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png","type":"","width":"","height":""}],"author":"flinden68","twitter_misc":{"Written by":"flinden68","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/elstarit.nl\/?p=225#article","isPartOf":{"@id":"https:\/\/elstarit.nl\/?p=225"},"author":{"name":"flinden68","@id":"https:\/\/elstarit.nl\/#\/schema\/person\/426456e816ad57bf411d5d2bb9768935"},"headline":"My steps in the JSF 2.0 world","datePublished":"2014-10-24T14:14:52+00:00","dateModified":"2014-10-24T14:15:49+00:00","mainEntityOfPage":{"@id":"https:\/\/elstarit.nl\/?p=225"},"wordCount":465,"commentCount":0,"image":{"@id":"https:\/\/elstarit.nl\/?p=225#primaryimage"},"thumbnailUrl":"http:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png","keywords":["Annotations","Expression Language","java","jsf2.0"],"articleSection":["development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/elstarit.nl\/?p=225#respond"]}]},{"@type":"WebPage","@id":"https:\/\/elstarit.nl\/?p=225","url":"https:\/\/elstarit.nl\/?p=225","name":"My steps in the JSF 2.0 world - elstar IT","isPartOf":{"@id":"https:\/\/elstarit.nl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/elstarit.nl\/?p=225#primaryimage"},"image":{"@id":"https:\/\/elstarit.nl\/?p=225#primaryimage"},"thumbnailUrl":"http:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png","datePublished":"2014-10-24T14:14:52+00:00","dateModified":"2014-10-24T14:15:49+00:00","author":{"@id":"https:\/\/elstarit.nl\/#\/schema\/person\/426456e816ad57bf411d5d2bb9768935"},"description":"About my first 2 weeks at a new customer on a JSF 2.0 project","breadcrumb":{"@id":"https:\/\/elstarit.nl\/?p=225#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/elstarit.nl\/?p=225"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/elstarit.nl\/?p=225#primaryimage","url":"http:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png","contentUrl":"http:\/\/elstarit.nl\/wp-content\/uploads\/2014\/10\/Screen-Shot-2014-10-24-at-15.59.14.png"},{"@type":"BreadcrumbList","@id":"https:\/\/elstarit.nl\/?p=225#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/elstarit.nl\/"},{"@type":"ListItem","position":2,"name":"development","item":"https:\/\/elstarit.nl\/?cat=2"},{"@type":"ListItem","position":3,"name":"My steps in the JSF 2.0 world"}]},{"@type":"WebSite","@id":"https:\/\/elstarit.nl\/#website","url":"https:\/\/elstarit.nl\/","name":"elstar IT","description":"Fullstack | Java | Tech Speaker | Tech Coach | Frank van der Linden","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/elstarit.nl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/elstarit.nl\/#\/schema\/person\/426456e816ad57bf411d5d2bb9768935","name":"flinden68","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b915e82bbf3665adb6f7cef5acc5292b5958aec259f763ccde322ec72c643ec0?s=96&d=mm&r=g","caption":"flinden68"},"sameAs":["http:\/\/www.elstarit.nl","https:\/\/x.com\/elstarit"],"url":"https:\/\/elstarit.nl\/?author=1"}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elstarit.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=225"}],"version-history":[{"count":2,"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/elstarit.nl\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions\/228"}],"wp:attachment":[{"href":"https:\/\/elstarit.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elstarit.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elstarit.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}