In AlertDto:
  public com.baselogic.yoursos.location.LocationDto getStartingLocation()
  {
          return this.StartingLocation;
  }

In LocationDto:

  public java.lang.String getLocationId()
  {
          return this.locationId;
  }



---
Thanks...
Mick Knutson
---





From: Rick Reumann <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: nested bean parameters
Date: 28 Jun 2003 15:08:49 -0400

On Sat, 2003-06-28 at 13:31, Mick Knutson wrote:
> I have a Collection of AlertDto's. Each AlertDto has a method called
> getStartingLocation() that returns a LocationDto. That LocationDto has a
> method called getLocationTitle().
>
> How, in a JSP can I get the locationTitle?
>
> I have tried:
>
> <logic:iterate id="alert" name="alertListForm" property="userAlerts">
> <bean:write name="alert" property="startingLocation.locationId" />
> </logic:iterate>

What you need is for your nested bean to have a getter method that
matches the property name. So in your case if you have AlertDto and
inside you have a method getStartingLocation.. you have to make sure
that the name of LocationDto in the AlertDto is called
"startingLocation." Then you can just do like you have above. Are you
sure your LocationDto is called startingLocation inside of AlertDto ?

--
Rick


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to