title: Wired component null in seam EntityHome action
body: <p>I have a custom EntityHome class. I wire the dependent entity in the wire method, but when I call the action (persist) the wired component is always null. </p>
  
  <p>What could be the reason, similar code generated by seam gen is apparently working.</p>
  
  <p>Here is the entity class.</p>
  
  <p>The round.teeSet component is always null when persist is called, although it is shown in the jsf page. </p>
  
  <blockquote>
    <p>Note: Seam version: 2.2.0.GA Jboss:
    jboss-5.1.0.GA</p>
  </blockquote>
  
  <p>I have overrden persist method to log the value of the wired element. </p>
  
  <pre><code>@Name("roundHome")
  @Scope(ScopeType.CONVERSATION)
  public class RoundHome extends EntityHome&lt;Round&gt;{
  
      @In(required = false)
      private Golfer currentGolfer;
  
      @In(create = true)
      private TeeSetHome teeSetHome;
  
      @Override
      public String persist() {
          logger.info("Persist called");
          if (null != getInstance().getTeeSet() ) {
              logger.info("teeSet not null in persist");
          } else {
              logger.info("teeSet null in persist");
              // wire();
          }
          String retVal =  super.persist();    //To change body of overridden methods use File | Settings | File Templates.
          return retVal;
      }
  
      @Logger
      private Log logger;
  
      public void wire() {
  
          logger.info("wire called");
          TeeSet teeSet = teeSetHome.getDefinedInstance();
  
  
          if (null != teeSet) {
              getInstance().setTeeSet(teeSet);
              logger.info("Successfully wired the teeSet instance with color: " + teeSet.getColor());
          }
      }
  
      public boolean isWired() {
          logger.info("is wired called");
          if(null == getInstance().getTeeSet()) {
              logger.info("wired teeSet instance is null, the button will be disabled !");
              return false;
          }
          else {
              logger.info("wired teeSet instance is NOT null, the button will be enabled !");
              logger.info("teeSet color: "+getInstance().getTeeSet().getColor());
              return true;
          }
      }
  
      @RequestParameter
      public void setRoundId(Long id) {
          super.setId(id);
      }
  
      @Override
      protected Round createInstance() {
          Round round = super.createInstance();
          round.setGolfer(currentGolfer);
          round.setDate(new java.sql.Date(System.currentTimeMillis()));
          return round;
      }
  }
  </code></pre>
  
  <p>Here the xhtml </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  
  &lt;ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      template="layout/template.xhtml"&gt;
  
  &lt;ui:define name="body"&gt;
      &lt;h:form id="roundform"&gt;
          &lt;rich:panel&gt;
              &lt;f:facet name="header&gt;"&gt;
                  #{roundHome.managed ? 'Edit' : 'Add' } Round
              &lt;/f:facet&gt;
              &lt;s:decorate id="dateField" template="layout/edit.xhtml"&gt;
                  &lt;ui:define name="label"&gt;Date:&lt;/ui:define&gt;
                  &lt;rich:calendar id="date" datePattern="dd/MM/yyyy" value="#{round.date}"/&gt;
              &lt;/s:decorate&gt;
  
  
              &lt;s:decorate id="notesField" template="layout/edit.xhtml"&gt;
                  &lt;ui:define name="label"&gt;Notes:&lt;/ui:define&gt;
                  &lt;h:inputTextarea id="notes" cols="80" rows="3" value="#{round.notes}" /&gt;
              &lt;/s:decorate&gt;
  
  
              &lt;s:decorate id="totalScoreField" template="layout/edit.xhtml"&gt;
                  &lt;ui:define name="label"&gt;Total Score:&lt;/ui:define&gt;
                  &lt;h:inputText id="totalScore" value="#{round.totalScore}" /&gt;
              &lt;/s:decorate&gt;
  
  
              &lt;s:decorate id="weatherField" template="layout/edit.xhtml"&gt;
                  &lt;ui:define name="label"&gt;Weather:&lt;/ui:define&gt;
                  &lt;h:selectOneMenu id="weather" value="#{round.weather}"&gt;
                      &lt;s:selectItems var="_weather" value="#{weatherCategories}" label="#{_weather.label}"
                                     noSelectionLabel=" Select " /&gt;
                      &lt;s:convertEnum/&gt;
                  &lt;/h:selectOneMenu&gt;
              &lt;/s:decorate&gt;
  
  
              &lt;div style="clear: both;"&gt;
                  &lt;span class="required"&gt;*&lt;/span&gt; required fields
              &lt;/div&gt;
          &lt;/rich:panel&gt;
  
          &lt;div class="actionButtons"&gt;
              &lt;h:commandButton id="save" value="Save"
                               action="#{roundHome.persist}"
                               rendered="#{!roundHome.managed}" /&gt;
              &lt;!-- disabled="#{!roundHome.wired}"  /&gt; --&gt;
  
              &lt;h:commandButton id="update" value="Update" action="#{roundHome.update}"
                               rendered="#{roundHome.managed}" /&gt;
  
              &lt;h:commandButton id="delete" value="Delete" action="#{roundHome.remove}"
                               rendered="#{roundHome.managed}" /&gt;
  
              &lt;s:button id="discard" value="Discard changes" propagation="end"
                        view="/Round.xhtml" rendered="#{roundHome.managed}" /&gt;
  
              &lt;s:button id="cancel" value="Cancel" propagation="end"
                        view="/#{empty roundFrom ? 'RoundList' : roundFrom}.xhtml"
                        rendered="#{!roundHome.managed}" /&gt;
  
          &lt;/div&gt;
  
          &lt;rich:tabPanel&gt;
              &lt;rich:tab label="Tee Set"&gt;
                  &lt;div class="association"&gt;
                      &lt;h:outputText value="Tee set not selected" rendered="#{round.teeSet == null}" /&gt;
                      &lt;rich:dataTable var="_teeSet" value="#{round.teeSet}" rendered="#{round.teeSet != null}"&gt;
                          &lt;h:column&gt;
                              &lt;f:facet name="header"&gt;Course&lt;/f:facet&gt;#{_teeSet.course.name}
                          &lt;/h:column&gt;
                          &lt;h:column&gt;
                              &lt;f:facet name="header"&gt;Color&lt;/f:facet&gt;#{_teeSet.color}
                          &lt;/h:column&gt;
                          &lt;h:column&gt;
                              &lt;f:facet name="header"&gt;Position&lt;/f:facet&gt;#{_teeSet.pos}
                          &lt;/h:column&gt;
                      &lt;/rich:dataTable&gt;
                  &lt;/div&gt;
              &lt;/rich:tab&gt;
          &lt;/rich:tabPanel&gt;
      &lt;/h:form&gt;
  &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>