title: JSF, multiple bean update property in a form
body: <p>I edited my question to be more precise as I have more time to write it.</p>
  
  <p>I have a JSF form that should modify the value of the different properties of a dog :</p>
  
  <pre><code>&lt;h:form id="submit"&gt;
       &lt;h:outputLabel value="Dog name:"/&gt;
       &lt;h:inputText value="#{User.dog.name}" id="dogName"/&gt;
       &lt;h:outputLabel value="Name :"/&gt;
       &lt;h:inputSecret value="#{User.name}" id="name" /&gt;
       &lt;h:commandButton type="submit" value="Submit" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>This is my managed bean <code>User.java</code> :
  (All the getter and setter are good and valid, as this is a bean constructor is empty).
  (Initially Dog property is initialized in a validation method, so it has a value and is <code>not null</code>)</p>
  
  <pre><code>public class User {
      public User() {}
      String  name;
      Dog dog;
  
      (...get, set, ect...)
  </code></pre>
  
  <p>This is an other bean that I have not set managed as it is only used by User class 
  <code>Dog.java</code> :</p>
  
  <pre><code>public class Dog{
      public User() {}
      String  dog_name;
  
  (...)
  </code></pre>
  
  <p><em>Offcourse this is a simple exemple for understanding the thing.</em></p>
  
  <p>When I send the form, <code>User.name</code> property will update but not the <code>User.dog.name</code> property.</p>
  
  <p><em>How can both java classes' values be updated ?</em></p>
  
  <p>After the form is submitted I show the current values, only the <code>User.name</code> has changed :</p>
  
  <p>System.out.println(User.name); //value changed after form is submitted
  System.out.println(User.dog.name); //value NOT changed after form is submitted</p>
  
  <p>I dont know if you understand my problem here, I want to manipulate the Dog class properties within my JSF form althouth I wont modify the Dog bean directly, only the <code>User.Dog</code>...</p>
  
  <p>By the way, faces-config is ok :</p>
  
  <p>EDIT :
  I have added a  for my User managed bean. Although, nothing is changed...</p>
  
  <pre><code>&lt;managed-property&gt;
      &lt;property-name&gt;dog&lt;/property-name&gt;
      &lt;property-class&gt;package.Dog&lt;/property-class&gt;
      &lt;value&gt;#{Dog}&lt;/value&gt;
  &lt;/managed-property&gt;
  </code></pre>