title: How to do conditional update on a component
body: <p>I have a JSF composite component which renders only some parts based on the attribute <code>cc.attrs.list</code> passed to it. 
  In one of the components I want to update a set of other components based on the attribute. So something like this:</p>
  
  <pre><code>&lt;p:ajax event="dialogReturn" listener="#{cc.listener}" 
  update="#{cc.attrs.id2}_input #{cc.attrs.id2}_resultTable"/&gt;
  </code></pre>
  
  <p>The problem is that the resultTable is not rendered all the time and when the resultTable is not there, I get an exception <code>Cannot find component with expression "id_resultTable"</code>, which is not surprising. So my idea was to create a variable which will contain id of the attribute or empty String like this:</p>
  
  <pre><code>&lt;c:if test="#{cc.attrs.list}"&gt;
      &lt;ui:param name="updateTable" value="#{cc.attrs.id2}_resultTable"/&gt;
  &lt;/c:if&gt;
  &lt;c:otherwise&gt;
      &lt;ui:param name="updateTable" value=""/&gt;
  &lt;/c:otherwise&gt;
  </code></pre>
  
  <p>and then do the ajax update like this:</p>
  
  <pre><code> &lt;p:ajax event="dialogReturn" listener="#{cc.listener}" 
  update="#{cc.attrs.id2}_input #{updateTable}"/&gt;
  </code></pre>
  
  <p>The problem is, that the <code>#{updateTable}</code> variable is always an empty String(I've tried to put it as a content of outputText) and I have no idea why. </p>