title: Update c:foreach / ui:repeat with javascript
body: <p>Trying to update c:foreach with javascript . even though the view is refreshing the new value which is inserted into DB is not been shown in the view . I had also tried with ui:repeat and a:repeat situation is same . Any changes which i need to do . </p>
  
  <pre><code>&lt;div id="spModOutput"&gt;
      &lt;ui:repeat value="#{ActionClass.listMethod()}" var="scenarioVar"&gt;
          "#{scenarioVar.scenarioId}"
      &lt;/ui:repeat&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
      $('#newSpScenarioId').on('click', function() {
          document.getElementById('scenarioFormForAction:createNewScenarioSp').click();
      });
  &lt;/script&gt;
  
  &lt;script&gt;
      function afterCompleteLoadTree() {
          alert("ROW CREATED IN DB  !!!");
          $('#spModOutput').fadeOut(100);
          $('#spModOutput').fadeIn(100);
          $('#spModOutput').jqxTree("refresh");
      }
  &lt;/script&gt;
  
  &lt;h:form id="scenarioFormForAction"&gt;
      &lt;a4j:commandLink id="createNewScenarioSp" style="visibility: hidden;" 
          action="#{ActionClass.createNewRow()}" 
          oncomplete="afterCompleteLoadTree()"&gt;
      &lt;/a4j:commandLink&gt;
  &lt;/h:form&gt;
  </code></pre>