1 Reply Latest reply on Aug 8, 2007 12:08 PM by Pete Muir

    Strange problem using Seam iterating display components like

    Mike Kohout Newbie

      I'm creating a page where a user selects elements to be added to a entity object from a rich datatable...simple enough.

      That functionality works-when I look at the domain object through the debug.seam view, I see it's being updated.

      But when I attempt to display/iterate over the list of elements in the domain object, I'm getting this error:

      javax.el.ELException: /home.xhtml: Property 'name' not found on type java.util.HashSet
      


      here's my code:
      <h:inputText id="findMentor" value="#{newTeamFormMap.mentorName}">
       <a4j:support event="onkeyup" reRender="mentorSelectList" requestDelay="1000" ignoreDupResponces="true" eventsQueue="myQueue" />
       </h:inputText>
       <rich:spacer height="10"/>
       <rich:dataTable id="mentorSelectList" value="#{userHome.findByNameOrInternetID( newTeamFormMap.mentorName )}" var="user" render="#{not empty newTeamFormMap.mentorName}">
       <rich:column>
       <f:facet name="header">Name</f:facet>
       #{user.name}
       </rich:column>
       <rich:column>
       <f:facet name="header">Add to List of Project Mentors</f:facet>
       <a4j:commandButton type="submit" value="Add" reRender="selectedMentorList" action="#{newTeam.mentors.add(user)}" />
       </rich:column>
       </rich:dataTable>
       <rich:spacer height="10"/>
      
       <a4j:repeat id="selectedMentorList" value="#{newTeam.mentors}" var="selectedMentor" rendered="#{newTeam.mentors.size gt 0}" summary="Project Mentors">
       #{selectedMentor.name}
       </a4j:repeat>
      

      The error is occurring at the bottom, at
      #{selectedMentor.name}


      The userHome object is pretty generic-userHome.findByNameOrInternetID expects a String as a parameter and returns a Set, as is newTeam- the mentors property is a Set(HashSet) as well. Nothing is defined as a DataModel, but it seems that if that was the problem I wouldn't be able to see my entity object being updated via debug.seam.

      does anyone see an error or what am I doing wrong? could this be a richfaces/a4j error rather than a seam error?

      thanks
      Mike Kohout

      --also, if anyone was tracking my saga with SSO, I was able to get single sign on working for my site. Sometime soon I'll post all my steps...