1 Reply Latest reply on Aug 27, 2007 5:21 AM by Adrian Mitev

    Problem with scopes

    Adrian Mitev Master

      Hi all! I have the following page code:

      <table>
       <tr>
       <td></td>
       <td><h:selectOneMenu id="stateMenu"
       value="#{menuSelector.status}">
       <s:selectItems label="#{stat.value}" value="#{statuses}" var="stat" />
       <s:convertEntity />
       <a4j:support event="onchange" reRender="issueTabs"></a4j:support>
       </h:selectOneMenu></td>
       </tr>
      
       <tr>
       <td></td>
       <td><h:selectOneMenu rendered="#{menuSelector.status.id > 2}"
       id="resMenu" value="#{menuSelector.resolution}">
       <s:selectItems label="#{res.value}" value="#{resolutions}"
       var="res" />
       <s:convertEntity />
       </h:selectOneMenu></td>
       </tr>
      
       <tr>
       <td colspan="2"><a4j:commandButton action="#{issueAction.changeState}" style="margin-left: 3px" value="#{issueMsg.accept}" /></td>
       </tr>
       </table>


      There are 2 selectOneMenu bound to menuSelector component which has EVENT scope. I invoke action method from other component that is in the current conversation but there the injected menuSelector object is null. If i move the action method in menuSelector and inject the Issue object there it works fine. Idea why i cannot inject event scoped component in conversation scoped component?