title: How to get input component's submitted value in backing component
body: <p>I have made a composite component with a backing <code>UIInput</code>. It contains a number spinner. When the spinner is changed, the new value doesn't get sent to the backing component.</p>
  
  <p>I have simplified the situation (a backing will seem unnecessary, however, the problem still occurs). </p>
  
  <p>The <code>Sytem.out.println</code> highlights the problem.</p>
  
  <p>Composite component:</p>
  
  <pre><code>&lt;cc:interface componentType="periodInput" &gt;
      &lt;cc:attribute name="value" type="org.joda.time.Period" /&gt;
  &lt;/cc:interface&gt;
  
  &lt;cc:implementation&gt;
      &lt;p:spinner id="count" min="0" binding="#{cc.countComponent}" converter="javax.faces.Integer" label="Every "/&gt;
  &lt;/cc:implementation&gt;
  </code></pre>
  
  <p><br /></p>
  
  <p>Backing component:</p>
  
  <pre><code>@FacesComponent("periodInput")
  public class PeriodBacking extends UIInput implements NamingContainer {
  
      private UIInput countComponent;
      // And getter &amp; setter.
  
      @Override
      public void encodeBegin(FacesContext context) throws IOException {
          Period period = (Period) getValue();
          if(period == null) {
              period = Period.weeks(1).withPeriodType(PeriodType.weeks());
          }
          int count;
          count = period.get(period.getFieldTypes()[0]);
          countComponent.setValue(count);
          super.encodeBegin(context);
      }
  
      @Override
      public Object getSubmittedValue() {
          return this;
      }
  
      @Override
      protected Object getConvertedValue(FacesContext context, Object newSubmittedValue) {
          // PROBLEM: Always prints out '1':
          System.out.println("Count: " + count); 
          int count = (Integer) countComponent.getValue();
          Period totalPeriod = new Period(0).withDays(count);
          return totalPeriod;
      }
  
      @Override
      public String getFamily() {
          return UINamingContainer.COMPONENT_FAMILY;
      }
  }
  </code></pre>
  
  <p>The composite component is used like so:</p>
  
  <pre><code>&lt;custom:Period value="#{cc.attrs.trackedproduct.samplePeriod}" /&gt;
  </code></pre>
  
  <p>Where <code>trackedproduct</code> is present in a <code>@ViewScoped</code> bean. </p>