title: Conditional update in Primefaces/jsf
body: <p>First of all, so that there are no misunderstandings, while this is the same question as <a href="https://stackoverflow.com/questions/9638290/primefaces-conditional-update-on-validation">PrimeFaces: conditional update on validation</a> I am asking it again, because the <strong>answer to that question is not acceptable to me</strong>, because while it may have given the original poster a workaround for what they were asking, it doesn't really answer the question, and this workaround doesn't work for me.</p>
  
  <p>So, here's my question: how do I conditionally update a primefaces component based on the results of the submition?</p>
  
  <p>I have a component that must not, under any circumstances be updated UNLESS the validation is successful and backend code was executed successfully. (i.e. if the validation succeeds but there was an SQL exception on the back end, the component still shouldn't be updated).</p>
  
  <p>Why can't I always update it? If the logic doesn't succeed it'll be updated to the same thing it was before the submit button was clicked. <strong>Because I can't.</strong> It's the captcha component. If you update it via ajax, it disappears, end of story. There was a ticket opened at Primefaces and they closed it as won't fix, because flash compoents aren't supposed to be updated w/ ajax.</p>
  
  <p>So when I submit the form, unless the logic succeeds I need to leave the captcha alone. IF the logic succeeds, I need to make sure the captcha disappears off screen. What's the easiest, cleanest way to do it?</p>
  
  <p>Excuse me if this is a n00b question. I'm really new to Primefaces and JSF.</p>