3 Replies Latest reply on Jul 1, 2010 1:40 PM by Hope Nedde

    scope is not active at ajax request

    Jurij Lender Newbie
      Hi,

      when clicking an ajax commandButton, i want a bean property to be populated with the current value of an iteration. The setter method is called, but unfortunately the value of the property remains null.

      view:
      <table>
      <a:repeat value="#{userBean.resultList}" var="_user">
      <tr>
      <td><h:outputText value="#{_user.name}" /></td>
      <td><a:commandButton ajaxSingle="true" value="Select" reRender="userDetail">
      <f:setPropertyActionListener value="#{_user}" target="#{userBean.selectedUser}" />
      <s:conversationId />
      </a:commandButton></td>
      </tr>
      </a:repeat>
      </table>


      *page.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <page xmlns="http://jboss.com/products/seam/pages"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
              <begin-conversation join="true" flush-mode="auto"/>
      </page>


      action-bean:

      @Name("userBean")
      @Scope(ScopeType.CONVERSATION)
      public class UserBean {
             
              @In(create = true, required = false) EntityManager entityManager;
              @Logger Log log;
             
              private User selectedUser;

              [...]
      }



      the interesting part is, that i get the following warning in my console:

      14:22:53,695 WARN  [org.jboss.seam.Component] Cannot create Seam component, scope is not active: userBean(CONVERSATION)


      How is that possible? i have already searched for equivalent posts, also i have restarted the application on my server (using jboss 6 M2)