title: How to change the value of an outputText?
body: <p>I am developing a system that the user choose some checkboxes and each checkbox have a currency value, and I want to change a outputText according to selected checkboxes.</p>
  
  <p>Example: I have three checkboxes, each one have $10.00. If the user choose just two checkboxes, the outputText must show $20.00. If the user choose the last one, the outputText must show $30.00. And all this without reloading the page.</p>
  
  <p>My code so far:</p>
  
  <pre><code>&lt;h:form id="form"&gt;
      &lt;p:fieldset legend="Tipo base do site:" style="margin-bottom:20px"&gt;
          &lt;h:panelGrid columns="2" cellpadding="5"&gt;
              &lt;p:dataList value="#{tiposIndexView.tipos}" var="tipo"
              type="ordered" &gt;
                  R$ 
                  &lt;h:outputText value="#{tipo.preco}" &gt;
                      &lt;f:convertNumber pattern="#0.00" /&gt;
                  &lt;/h:outputText&gt;
              &lt;/p:dataList&gt;
              &lt;p:selectOneRadio id="tipo" value="#{tiposIndexView.tipos}"
                      layout="grid" columns="1"&gt;
                      &lt;f:selectItems value="#{tiposIndexView.tipos}" var="tipo"
                          itemLabel="#{tipo.nome}" itemValue="#{tipo.nome}" /&gt;
              &lt;/p:selectOneRadio&gt;
          &lt;/h:panelGrid&gt;
      &lt;/p:fieldset&gt;
  
      &lt;p:fieldset legend="Sistemas adicionais:" style="margin-bottom:20px"&gt;
          &lt;h:panelGrid columns="2" cellpadding="5"&gt;
              &lt;p:dataList value="#{sistemasIndexView.sistemas}" var="sistema"
              type="ordered" &gt;
                  R$ 
                  &lt;h:outputText value="#{sistema.preco}" &gt;
                      &lt;f:convertNumber pattern="#0.00" /&gt;
                  &lt;/h:outputText&gt;
              &lt;/p:dataList&gt;
              &lt;p:selectManyCheckbox style="margin-top:0px;!important" id="grid" value="#{sistemasIndexView.sistemas}" layout="grid" columns="1"&gt;
                  &lt;f:selectItems value="#{sistemasIndexView.sistemas}" var="sistema" itemLabel="#{sistema.nome}" itemValue="#{sistema}" /&gt;
              &lt;/p:selectManyCheckbox&gt;
          &lt;/h:panelGrid&gt;
      &lt;/p:fieldset&gt;
  
      &lt;p:fieldset legend="Valor total:"&gt;
          &lt;h:outputText&gt;
              R$ 
              &lt;f:convertNumber pattern="#0.00" /&gt;
          &lt;/h:outputText&gt;
      &lt;/p:fieldset&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>The last outputText is where I want to show the total value.</p>
  
  <p>And one more question, every time that I open my site, all checkboxes starts checked and I want to all start unchecked. The code of checkboxes:</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class SistemasIndexView implements Serializable{
      private static final long serialVersionUID = -2697991732915561009L;
      private List&lt;Sistema&gt; sistemas;
  
      @PostConstruct
      public void init(){
          sistemas = new ArrayList&lt;&gt;();
          sistemas.add(new Sistema("Teste", 200));
          sistemas.add(new Sistema("Exemplo", 300));
          sistemas.add(new Sistema("gsdfaf", 50));
      }
  
      public List&lt;Sistema&gt; getSistemas() {
          return sistemas;
      }
  
      public void setSistemas(List&lt;Sistema&gt; sistemas) {
          this.sistemas = sistemas;
      }
  }
  </code></pre>