2 Replies Latest reply on Aug 17, 2006 9:45 AM by c_eric_ray

    DataModelSelection is null

    neillane

      Hi

      I am getting a wiered NullPointer Exception when selecting an item from the @DataModelSelection

      I Have the following:

      @DataModel
      private List<Envelope> inboxEnvelopes;

      @DataModelSelection
      private Envelope selectedInboxEnvelope;


      I am cloning the Bookings example and have returned and displayed the objects in a dataTable with an s;link to the method selectItem()

      The SelectItem() method runs

      envelope = em.merge(inboxEnvelopeSearch.getSelectedInboxEnvelope());



      I have set all the @Out to not be required and the @In for the class that performs the database search to return the DataModel List to also be required=false.

      @In(required = false)
       private InboxEnvelopeSearch inboxEnvelopeSearch;


      Otherwise I get :

      In attribute requires value for component


      Any ideas

        • 1. Re: DataModelSelection is null
          bfo81

          Hm... seems like Seam cannot find a component named "inboxEnvelopeSearch"... just a small idea: Is the InboxEnvelopeSearchBean annotated with @Name("inboxEnvelopeSearch")? Maybe a typo somewhere?

          • 2. Re: DataModelSelection is null

            A couple of things

            1. Make sure your web page references the correct Seam Named Component.
            2. Make sure your Scope is appropriate.

            I've found that the exception you get always points back to one of these two things. There could be others, but this is what I've seen.

            Most likely bfo81 is correct and it's a component naming issue.