{"id":805,"date":"2012-01-24T15:58:00","date_gmt":"2012-01-24T15:58:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/jsf-and-the-immediate-attribute-command-components.html"},"modified":"2013-01-21T09:35:47","modified_gmt":"2013-01-21T07:35:47","slug":"jsf-and-immediate-attribute-command","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html","title":{"rendered":"JSF and the &#8220;immediate&#8221; Attribute &#8211; Command Components"},"content":{"rendered":"<div style=\"text-align: left;\" dir=\"ltr\">\n<p>The <strong>immediate <\/strong>attribute in JSF is commonly misunderstood. If you don&#8217;t believe me, check out <a href=\"http:\/\/stackoverflow.com\/search?q=jsf+immediate\">Stack Overflow<\/a>. Part of the confusion is likely due to <strong>immediate <\/strong>being available on both input (i.e.. &lt;h:inputText \/&gt;) and command (i.e. &lt;h:commandButton \/&gt;) components, each of which affects the JSF lifecycle differently.<\/p>\n<p>Here is the standard JSF lifecycle:<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><\/div>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http:\/\/2.bp.blogspot.com\/-cKIq6HzMMVs\/Txwh2TZ3OVI\/AAAAAAAAAEg\/6cNYE1bKgHY\/s1600\/JSF+Lifecycle+-+Standard.png\"><img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-cKIq6HzMMVs\/Txwh2TZ3OVI\/AAAAAAAAAEg\/6cNYE1bKgHY\/s1600\/JSF+Lifecycle+-+Standard.png\" alt=\"\" border=\"0\" \/><\/a><\/div>\n<p>For the purposes of this article, I&#8217;ll assume you are familiar with the basics of the JSF lifecycle. If you need an introduction or a memory refresher, check out the <a href=\"http:\/\/docs.oracle.com\/javaee\/6\/tutorial\/doc\/bnaqq.html\">Java EE 6 Tutorial &#8211; The Lifecycle of a JavaServer Faces Application<\/a>.<\/p>\n<p><em>Note: the code examples in this article are for JSF 2 (Java EE 6), but the principals are the same for JSF 1.2 (Java EE 5).<\/em><\/p>\n<h2>immediate=true on Command components<\/h2>\n<p>In the <em>standard<\/em> JSF lifecycle, the action attribute on an Command component is evaluated in the <strong>Invoke Application<\/strong> phase. For example, say we have a <strong>User <\/strong>entity\/bean:<\/p>\n<pre class=\"brush: java\">public class User implements Serializable {\r\n @NotBlank\r\n @Length(max = 50)\r\n private String firstName;\r\n\r\n @NotBlank\r\n @Length(max = 50)\r\n private String lastName;\r\n\r\n \/* Snip constructors, getters\/setters, a nice toString() method, etc *\/\r\n}<\/pre>\n<p>And a <strong>UserManager <\/strong>to serve as our managed bean:<\/p>\n<pre class=\"brush: java\">@SessionScoped\r\n@ManagedBean\r\npublic class UserManager {\r\n private User newUser;\r\n\r\n \/* Snip some general page logic... *\/\r\n\r\n public String addUser() {\r\n  \/\/Snip logic to persist newUser\r\n\r\n  FacesContext.getCurrentInstance().addMessage(null,\r\n    new FacesMessage(\"User \" + newUser.toString() + \" added\"));\r\n\r\n  return \"\/home.xhtml\";\r\n }<\/pre>\n<p>And a basic Facelets page, <strong>newUser.xhtml<\/strong>, to render the view:<\/p>\n<pre class=\"brush: xml\">&lt;h:form&gt;\r\n &lt;h:panelGrid columns=\"2\"&gt;\r\n\r\n  &lt;h:outputText value=\"First Name: \" \/&gt;\r\n  &lt;h:panelGroup&gt;\r\n   &lt;h:inputText id=\"firstName\"\r\n    value=\"#{userManager.newUser.firstName}\" \/&gt;\r\n   &lt;h:message for=\"firstName\" \/&gt;\r\n  &lt;\/h:panelGroup&gt;\r\n\r\n  &lt;h:outputText value=\"Last Name: \" \/&gt;\r\n  &lt;h:panelGroup&gt;\r\n   &lt;h:inputText id=\"lastName\" value=\"#{userManager.newUser.lastName}\" \/&gt;\r\n   &lt;h:message for=\"lastName\" \/&gt;\r\n  &lt;\/h:panelGroup&gt;\r\n\r\n &lt;\/h:panelGrid&gt;\r\n\r\n &lt;h:commandButton value=\"Add User\" action=\"#{userManager.addUser()}\" \/&gt;\r\n&lt;\/h:form&gt;<\/pre>\n<p>Which all combine to produce this lovely form:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http:\/\/4.bp.blogspot.com\/-vxMAK2BrXjs\/TxwiILFiebI\/AAAAAAAAAEo\/IAeu1cX225M\/s1600\/Form+screenshot+-+basic.png\"><img decoding=\"async\" src=\"http:\/\/4.bp.blogspot.com\/-vxMAK2BrXjs\/TxwiILFiebI\/AAAAAAAAAEo\/IAeu1cX225M\/s320\/Form+screenshot+-+basic.png\" alt=\"\" width=\"320\" height=\"133\" border=\"0\" \/><\/a><\/div>\n<p>When the user clicks on the <strong>Add User<\/strong> button, <strong>#{userManager.addUser}<\/strong> will be called in the <strong>Invoke Application<\/strong> phase; this makes sense, because we want the input fields to be validated, converted, and applied to newUser before it is persisted.<\/p>\n<p>Now let&#8217;s add a &#8220;cancel&#8221; button to the page, in case the user changes his\/her mind. We&#8217;ll add another &lt;h:commandButton \/&gt; to the page:<\/p>\n<pre class=\"brush: xml\">&lt;h:form&gt;\r\n &lt;!-- Snip Input components --&gt; \r\n\r\n &lt;h:commandButton value=\"Add User\" action=\"#{userManager.addUser()}\" \/&gt;\r\n &lt;h:commandButton value=\"Cancel\" action=\"#{userManager.cancel()}\" \/&gt;\r\n&lt;\/h:form&gt;<\/pre>\n<p>And the <strong>cancel()<\/strong> method to <strong>UserManager<\/strong>:<\/p>\n<pre class=\"brush: java\">public String cancel() {\r\n newUser = new User();\r\n\r\n FacesContext.getCurrentInstance().addMessage(null,\r\n   new FacesMessage(\"Cancelled new user\"));\r\n\r\n return \"\/home.xhtml\";\r\n}<\/pre>\n<p>Looks good, right? But when we actually try to use the cancel button, we get errors complaining that first and last name are required:<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http:\/\/3.bp.blogspot.com\/-H6XYPFulvD0\/TxwiSdnhWQI\/AAAAAAAAAEw\/G1EGiuQos_A\/s1600\/JSF+Lifecycle+-+Cancel+without+immediate.png\"><img decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-H6XYPFulvD0\/TxwiSdnhWQI\/AAAAAAAAAEw\/G1EGiuQos_A\/s320\/JSF+Lifecycle+-+Cancel+without+immediate.png\" alt=\"\" width=\"320\" height=\"123\" border=\"0\" \/><\/a><\/div>\n<p>This is because <strong>#{userManager.cancel}<\/strong> isn&#8217;t called until the <strong>Invoke Application<\/strong> phase, which occurs <em>after <\/em>the <strong>Process Validations<\/strong> phase; since we didn&#8217;t enter a first and last name, the validations failed before <strong>#{userManager.cancel}<\/strong> is called, and the response is rendered after the <strong>Process Validations<\/strong> phase.<\/p>\n<p>We certainly don&#8217;t want to require the end user to enter a valid user before cancelling! Fortunately, JSF provides the <strong>immediate <\/strong>attribute on Command components. When <strong>immediate <\/strong>is set to true on an Command component, the action is invoked in the <strong>Apply Request Values<\/strong> phase:<\/p>\n<div class=\"separator\" style=\"clear: both; text-align: center;\"><a href=\"http:\/\/4.bp.blogspot.com\/-h8Ejgb0kOsA\/Txwid565uJI\/AAAAAAAAAE4\/_dA_s1zi0W4\/s1600\/JSF+Lifecycle+-+Immediate+on+Command+Component.png\"><img decoding=\"async\" src=\"http:\/\/4.bp.blogspot.com\/-h8Ejgb0kOsA\/Txwid565uJI\/AAAAAAAAAE4\/_dA_s1zi0W4\/s1600\/JSF+Lifecycle+-+Immediate+on+Command+Component.png\" alt=\"\" border=\"0\" \/><\/a><\/div>\n<p>This is perfect for our Cancel use case. If we add <strong>immediate=true <\/strong>to the Cancel , #<strong>{userManager.cancel}<\/strong> will be called in the <strong>Apply Request Values<\/strong> phase, before any validation occurs. <\/p>\n<pre class=\"brush: xml\">&lt;h:form&gt;  \r\n &lt;!-- Snip Input components --&gt;\r\n\r\n &lt;h:commandButton value=\"Add User\" action=\"#{userManager.addUser()}\" \/&gt;\r\n &lt;h:commandButton value=\"Cancel\" action=\"#{userManager.cancel()}\" immediate=\"true\" \/&gt;\r\n&lt;\/h:form&gt;<\/pre>\n<p>So now when we click cancel, <strong>#{userManager.cancel}<\/strong> is called in the <strong>Apply Request Values<\/strong> phase, and we are directed back to the home page with the expected cancellation message; no validation errors!<\/p>\n<div class=\"separator\" style=\"clear: both; font-weight: bold; text-align: center;\"><a href=\"http:\/\/1.bp.blogspot.com\/-iRlyCnkNNTQ\/TxwjCsIs6oI\/AAAAAAAAAFI\/W9hCiDPWZmg\/s1600\/Form+screenshot+-+immediate+on+cancel+button.png\"><img decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-iRlyCnkNNTQ\/TxwjCsIs6oI\/AAAAAAAAAFI\/W9hCiDPWZmg\/s400\/Form+screenshot+-+immediate+on+cancel+button.png\" alt=\"\" width=\"400\" height=\"176\" border=\"0\" \/><\/a><\/div>\n<h2 style=\"font-weight: bold;\"><strong><br \/>\n<\/strong><\/h2>\n<h2 style=\"font-weight: bold;\"><strong>What about Input components?<\/strong><\/h2>\n<p>Input components have the <strong>immediate <\/strong>attribute as well, which also moves all their logic into the <strong>Apply Request Values<\/strong> phase. However, the behavior is slightly different from Command components, especially depending on whether or not the validation on the Input component succeeds. My next article will address <strong>immediate=true<\/strong> on Input components. For now, here&#8217;s a preview of how the JSF lifecycle is affected:<\/p>\n<div>\n<div style=\"font-weight: bold;\"><\/div>\n<div class=\"separator\" style=\"clear: both; font-weight: bold; text-align: center;\"><a href=\"http:\/\/2.bp.blogspot.com\/-t5oH8YIGbBw\/TxwjoUHIRtI\/AAAAAAAAAFQ\/TItzDtsCTu4\/s1600\/JSF+Lifecycle+-+Immediate+on+Input+Component+-+no+errors.png\"><img decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-t5oH8YIGbBw\/TxwjoUHIRtI\/AAAAAAAAAFQ\/TItzDtsCTu4\/s1600\/JSF+Lifecycle+-+Immediate+on+Input+Component+-+no+errors.png\" alt=\"\" border=\"0\" \/><\/a><\/div>\n<div>\n<div style=\"font-weight: bold;\"><\/div>\n<div class=\"separator\" style=\"clear: both; font-weight: bold; text-align: center;\"><a href=\"http:\/\/1.bp.blogspot.com\/-lQWm1v_Bm6s\/Txwjx2I9wTI\/AAAAAAAAAFY\/-6H9qKaVuT8\/s1600\/JSF+Lifecycle+-+Immediate+on+Input+Component+-+with+errors.png\"><img decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-lQWm1v_Bm6s\/Txwjx2I9wTI\/AAAAAAAAAFY\/-6H9qKaVuT8\/s1600\/JSF+Lifecycle+-+Immediate+on+Input+Component+-+with+errors.png\" alt=\"\" border=\"0\" \/><\/a><\/div>\n<div style=\"font-weight: bold;\"><\/div>\n<div style=\"font-weight: bold;\"><\/div>\n<p><strong><em>Reference: \u00a0<\/em><\/strong><a href=\"http:\/\/jerryorr.blogspot.com\/2012\/01\/jsf-and-immediate-attribute-command.html\">JSF and the &#8220;immediate&#8221; Attribute &#8211; Command Components<\/a>\u00a0 from our\u00a0<a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a>\u00a0Jerry Orr at the\u00a0<a href=\"http:\/\/jerryorr.blogspot.com\/\">Jerry on Java<\/a>\u00a0blog.<\/p>\n<div style=\"font-weight: bold;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The immediate attribute in JSF is commonly misunderstood. If you don&#8217;t believe me, check out Stack Overflow. Part of the confusion is likely due to immediate being available on both input (i.e.. &lt;h:inputText \/&gt;) and command (i.e. &lt;h:commandButton \/&gt;) components, each of which affects the JSF lifecycle differently. Here is the standard JSF lifecycle: For &hellip;<\/p>\n","protected":false},"author":101,"featured_media":174,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[293],"class_list":["post-805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-jsf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JSF and the &quot;immediate&quot; Attribute - Command Components - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"The immediate attribute in JSF is commonly misunderstood. If you don&#039;t believe me, check out Stack Overflow. Part of the confusion is likely due to\" \/>\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\/01\/jsf-and-immediate-attribute-command.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JSF and the &quot;immediate&quot; Attribute - Command Components - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"The immediate attribute in JSF is commonly misunderstood. If you don&#039;t believe me, check out Stack Overflow. Part of the confusion is likely due to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.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-01-24T15:58:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-21T07:35:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jsf-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=\"Jerry Orr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/JerryOnJava\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jerry Orr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html\"},\"author\":{\"name\":\"Jerry Orr\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9aa7e765be6a02e9a20e1a9bd0f6f424\"},\"headline\":\"JSF and the &#8220;immediate&#8221; Attribute &#8211; Command Components\",\"datePublished\":\"2012-01-24T15:58:00+00:00\",\"dateModified\":\"2013-01-21T07:35:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html\"},\"wordCount\":541,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jsf-logo.jpg\",\"keywords\":[\"JSF\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html\",\"name\":\"JSF and the \\\"immediate\\\" Attribute - Command Components - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jsf-logo.jpg\",\"datePublished\":\"2012-01-24T15:58:00+00:00\",\"dateModified\":\"2013-01-21T07:35:47+00:00\",\"description\":\"The immediate attribute in JSF is commonly misunderstood. If you don't believe me, check out Stack Overflow. Part of the confusion is likely due to\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jsf-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/jsf-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/01\\\/jsf-and-immediate-attribute-command.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\":\"JSF and the &#8220;immediate&#8221; Attribute &#8211; Command Components\"}]},{\"@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\\\/9aa7e765be6a02e9a20e1a9bd0f6f424\",\"name\":\"Jerry Orr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4488e4246df9561e28f9a0c50162b86deaa9b0aa55199f22b7e87d5203dde179?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4488e4246df9561e28f9a0c50162b86deaa9b0aa55199f22b7e87d5203dde179?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4488e4246df9561e28f9a0c50162b86deaa9b0aa55199f22b7e87d5203dde179?s=96&d=mm&r=g\",\"caption\":\"Jerry Orr\"},\"description\":\"Jerry Orr is a software developer who currently spends most of his time on Java web applications. He has worked in a variety of domains, including commercial software, higher education, state government, and federal government.\",\"sameAs\":[\"http:\\\/\\\/jerryorr.blogspot.com\\\/\",\"http:\\\/\\\/www.linkedin.com\\\/pub\\\/jeremiah-orr\\\/37\\\/5a0\\\/329\\\/\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/JerryOnJava\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Jerry-Orr\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JSF and the \"immediate\" Attribute - Command Components - Java Code Geeks","description":"The immediate attribute in JSF is commonly misunderstood. If you don't believe me, check out Stack Overflow. Part of the confusion is likely due to","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\/01\/jsf-and-immediate-attribute-command.html","og_locale":"en_US","og_type":"article","og_title":"JSF and the \"immediate\" Attribute - Command Components - Java Code Geeks","og_description":"The immediate attribute in JSF is commonly misunderstood. If you don't believe me, check out Stack Overflow. Part of the confusion is likely due to","og_url":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-01-24T15:58:00+00:00","article_modified_time":"2013-01-21T07:35:47+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jsf-logo.jpg","type":"image\/jpeg"}],"author":"Jerry Orr","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/JerryOnJava","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Jerry Orr","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html"},"author":{"name":"Jerry Orr","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9aa7e765be6a02e9a20e1a9bd0f6f424"},"headline":"JSF and the &#8220;immediate&#8221; Attribute &#8211; Command Components","datePublished":"2012-01-24T15:58:00+00:00","dateModified":"2013-01-21T07:35:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html"},"wordCount":541,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jsf-logo.jpg","keywords":["JSF"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html","url":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html","name":"JSF and the \"immediate\" Attribute - Command Components - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jsf-logo.jpg","datePublished":"2012-01-24T15:58:00+00:00","dateModified":"2013-01-21T07:35:47+00:00","description":"The immediate attribute in JSF is commonly misunderstood. If you don't believe me, check out Stack Overflow. Part of the confusion is likely due to","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jsf-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/jsf-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/01\/jsf-and-immediate-attribute-command.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":"JSF and the &#8220;immediate&#8221; Attribute &#8211; Command Components"}]},{"@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\/9aa7e765be6a02e9a20e1a9bd0f6f424","name":"Jerry Orr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4488e4246df9561e28f9a0c50162b86deaa9b0aa55199f22b7e87d5203dde179?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4488e4246df9561e28f9a0c50162b86deaa9b0aa55199f22b7e87d5203dde179?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4488e4246df9561e28f9a0c50162b86deaa9b0aa55199f22b7e87d5203dde179?s=96&d=mm&r=g","caption":"Jerry Orr"},"description":"Jerry Orr is a software developer who currently spends most of his time on Java web applications. He has worked in a variety of domains, including commercial software, higher education, state government, and federal government.","sameAs":["http:\/\/jerryorr.blogspot.com\/","http:\/\/www.linkedin.com\/pub\/jeremiah-orr\/37\/5a0\/329\/","https:\/\/x.com\/http:\/\/twitter.com\/JerryOnJava"],"url":"https:\/\/www.javacodegeeks.com\/author\/Jerry-Orr"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/805","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\/101"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=805"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/805\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/174"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}