RE: nested bean parameters

2003-06-29 Thread Nick
Mike,

Are you still having a problem with this?  If so...looking at your
original JSP tags, I am sure that the problem is with your names not
matching up.  This is what needs to happen:

logic:iterate id=alert name=alertListForm property=userAlerts 
  bean:write name=alert property=startingLocation.locationId / 
/logic:iterate

In the object called alertListForm, there must be a getter and setter
for userAlerts: getUserAlerts() and setUserAlerts(Collection
userAlerts).  Those methods will return and accept a collection of
objects that in this case are LocationDTO's.

When you iterate, each object in the iteration will be known as an
alert, so the property that you specify has to have a getter/setter.
In this case, your property should be locationId.  Once again, insure
that you have the matching getter/setter methods: getLocationId() 
setLocationId(String locationId).

You do need to be careful with the capitalization.  We have found that
sticking to the java naming standard works best.  Defining a property
that begins with an uppercase throws Struts for a loop.

Hope this helps,
Nick




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



RE: nested bean parameters

2003-06-29 Thread Mick Knutson
) at 
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at 
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)



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




From: Nick [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: nested bean parameters
Date: Sun, 29 Jun 2003 05:55:51 -0400
Mike,

Are you still having a problem with this?  If so...looking at your
original JSP tags, I am sure that the problem is with your names not
matching up.  This is what needs to happen:
logic:iterate id=alert name=alertListForm property=userAlerts
  bean:write name=alert property=startingLocation.locationId /
/logic:iterate
In the object called alertListForm, there must be a getter and setter
for userAlerts: getUserAlerts() and setUserAlerts(Collection
userAlerts).  Those methods will return and accept a collection of
objects that in this case are LocationDTO's.
When you iterate, each object in the iteration will be known as an
alert, so the property that you specify has to have a getter/setter.
In this case, your property should be locationId.  Once again, insure
that you have the matching getter/setter methods: getLocationId() 
setLocationId(String locationId).
You do need to be careful with the capitalization.  We have found that
sticking to the java naming standard works best.  Defining a property
that begins with an uppercase throws Struts for a loop.
Hope this helps,
Nick


-
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]


Re: nested bean parameters

2003-06-29 Thread K.C. Baltz
(HttpConnection.java:939) at 
org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) 
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at 
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)



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




From: Nick [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: nested bean parameters
Date: Sun, 29 Jun 2003 05:55:51 -0400
Mike,

Are you still having a problem with this?  If so...looking at your
original JSP tags, I am sure that the problem is with your names not
matching up.  This is what needs to happen:
logic:iterate id=alert name=alertListForm property=userAlerts
  bean:write name=alert property=startingLocation.locationId /
/logic:iterate
In the object called alertListForm, there must be a getter and setter
for userAlerts: getUserAlerts() and setUserAlerts(Collection
userAlerts).  Those methods will return and accept a collection of
objects that in this case are LocationDTO's.
When you iterate, each object in the iteration will be known as an
alert, so the property that you specify has to have a getter/setter.
In this case, your property should be locationId.  Once again, insure
that you have the matching getter/setter methods: getLocationId() 
setLocationId(String locationId).
You do need to be careful with the capitalization.  We have found that
sticking to the java naming standard works best.  Defining a property
that begins with an uppercase throws Struts for a loop.
Hope this helps,
Nick


-
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]


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


Re: nested bean parameters

2003-06-28 Thread Rick Reumann
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]



Re: nested bean parameters

2003-06-28 Thread Mick Knutson
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]


Re: nested bean parameters

2003-06-28 Thread Rick Reumann
On Sat, 2003-06-28 at 15:10, Mick Knutson wrote:
 In AlertDto:
public com.baselogic.yoursos.location.LocationDto getStartingLocation()
{
 return this.StartingLocation;
}

StartingLocation should be startingLocation (lowercase s)

-- 
Rick


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



Re: nested bean parameters

2003-06-28 Thread Mick Knutson
I actually changed the JSP:

bean:write name=alert property=StartingLocation.locationId /

but also tried:
bean:write name=alert property=StartingLocation.LocationId /
but I got the same errors.



---
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:30:44 -0400
On Sat, 2003-06-28 at 15:10, Mick Knutson wrote:
 In AlertDto:
public com.baselogic.yoursos.location.LocationDto 
getStartingLocation()
{
 	  return this.StartingLocation;
}

StartingLocation should be startingLocation (lowercase s)

--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: nested bean parameters

2003-06-28 Thread K.C. Baltz
What kind of output are you getting?  It is possible something is wrong 
with the logic:iterate rather than the bean:write?



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


---
Thanks...
Mick Knutson
---
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


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


Re: nested bean parameters

2003-06-28 Thread Mick Knutson
) at 
org.mortbay.http.HttpServer.service(HttpServer.java:863) at 
org.jboss.jetty.Jetty.service(Jetty.java:460) at 
org.mortbay.http.HttpConnection.service(HttpConnection.java:775) at 
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) at 
org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) at 
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at 
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)







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




From: K.C. Baltz [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: nested bean parameters
Date: Sat, 28 Jun 2003 19:05:37 -0700
What kind of output are you getting?  It is possible something is wrong 
with the logic:iterate rather than the bean:write?



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


---
Thanks...
Mick Knutson
---
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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