Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-1814

DataModel wrapped data is set to null by ManagedEntityInterceptor

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0.BETA1
    • Fix Version/s: The future
    • Component/s: Core
    • Labels:
      None
    • Environment:

      seam cvs (20070816.1709)

      Description

      The following test fails:

      @Name("dataModelComponent")
      @Scope(ScopeType.CONVERSATION)
      public class DataModelComponent extends EntityQuery {

      @Override
      public String getEjbql()

      { return "from java.lang.Object o"; }

      }

      public class DataModelComponentTest extends SeamTest {

      @Test
      public void test() throws Exception {
      new FacesRequest() {
      @Override
      protected void renderResponse() throws Exception {
      DataModel model = (DataModel) getValue("#

      {dataModelComponent.dataModel}

      ");
      assert model.getWrappedData() != null;
      }
      }.run();
      }
      }

      Because the component is conversation-scoped, a ManagedEntityIdentityInterceptor is attached, which nulls the wrapped List after getDataModel() is called.

      In the referenced forum, Gavin indicated he hadn't decided whether this should be expected behavior or not, and asked for a jira issue.

      If it is expected behavior (I hope not), I think either EntityQuery should not have a getDataModel() attribute, or it should be documented and/or programmatically enforced that EntityQuerys should not be conversation-scoped.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dan.j.allen Dan Allen
                  Reporter:
                  matt.drees Matt Drees
                • Votes:
                  13 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Created:
                    Updated: