I have a DTO that contains a List of objects.  Since you can add any Object
to a List, I would rather not have a 
  setAssistants( List asst ); 
method that would allow someone to add a list of inappropriate object types.

Instead, I want to only have:
  public List getAssistants();
  public void addAssistant( PersonView p);

I know that having two 'set' methods with the same name but different
parameters *really* confuses the introspection/reflection/whatever magic
happens with JavaBeans.  Learned that one the hard way. :(

But what about a 'missing' set method?  It _seems_ to be working:

<c:forEach items="${trackDto.assistants}" var="asst">
  <c:out value="${asst.assistant.preferredName}"/> <c:out
value="${asst.assistedDate}"/>
</c:forEach>

I gather that JSTL uses the 'get' method to determine the type of the
object, because I'm not specifying that here and it's having no problems.

Please stop me now if I'm doing something that's going to cause problems
later!

Thanks,

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

Reply via email to