title: Primefaces JSF update after validation failed doesn't work
body: <p>I have a problem with the validation of a <code>&lt;p:inputText&gt;</code> and updating its content.</p>
  
  <p>Basically when the inputText validation fails, it never gets updated again.</p>
  
  <p>Here's a simple example to clarify:</p>
  
  <p>The Facelet:</p>
  
  <pre class="lang-xml prettyprint-override"><code>!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"&gt;
      &lt;h:head&gt;
      &lt;/h:head&gt;
      &lt;body&gt;
      &lt;h1&gt;Test&lt;/h1&gt;
  
          &lt;h:form id="list" prependId="false"&gt;
              &lt;ul&gt;
                  &lt;li&gt;Element 1&amp;#160;
                      &lt;p:commandLink action="#{Test.assignElement}" update="detail_value"&gt;
                          &lt;f:setPropertyActionListener target="#{Test.currentElement}" value="1" /&gt;
                          Assign
                      &lt;/p:commandLink&gt;
                  &lt;/li&gt;
                  &lt;li&gt;Element 2&amp;#160;
                      &lt;p:commandLink action="#{Test.assignElement}" update="detail_value"&gt;
                          &lt;f:setPropertyActionListener target="#{Test.currentElement}" value="2" /&gt;
                          Assign
                      &lt;/p:commandLink&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/h:form&gt;
  
          &lt;h:form id="detail" prependId="false"&gt;
              &lt;p:inputText value="#{Test.element}" id="detail_value" required="true" styleClass="#{Faces.messagesFor['detail_value'] ? 'border:1px solid red' : ''}"&gt;
                  &lt;p:ajax event="blur" update="detail_value"&gt;&lt;/p:ajax&gt;
              &lt;/p:inputText&gt;
          &lt;/h:form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The Test bean:</p>
  
  <pre><code>package com.easydevel.test;
  
  public class Test {
  
      private String currentElement;
      private String element;
  
      public String getCurrentElement() {
          return currentElement;
      }
  
      public void setCurrentElement(String currentElement) {
          this.currentElement = currentElement;
      }
  
      public String getElement() {
          return element;
      }
  
      public void setElement(String element) {
          this.element = element;
      }
  
      public String assignElement(){
          setElement(getCurrentElement());
          return "";
      }
  
  }
  </code></pre>
  
  <p>If you click on the commandLinks below the "Element"s the input field gets updated, but when a validation fails (simply leave the input text blank, and click on any other part of the page), the border of the input turns red. After that it never gets updated again when clicking on the above mentioned commandLinks.</p>
  
  <p>Any ideas?</p>