|
Re: #foreach help needed ...: msg#00172jakarta.velocity.user
You're right! it was a really STUPID mistake - my getters & setters were "protected" ... thanks a lot and sorry for bothering you! Everything works fine now! ----- Original Message ----- From: "Peter Romianowski" <megapero@xxxxxx> To: "'Velocity Users List'" <velocity-user@xxxxxxxxxxxxxxxxxx>; "'Jan Vesely'" <jan.vesely@xxxxxxxxxxx> Sent: Tuesday, November 26, 2002 12:09 PM Subject: RE: #foreach help needed ... > Do you have getters for the address-properties? Like > Address.getStreet()? > And are they public? Could you please send the Java-Files too, if the > problem persists? > > I don't see any problem besides the property-thing (at the moment). > > Peter > > > -----Original Message----- > > From: Jan Vesely [mailto:jan.vesely@xxxxxxxxxxx] > > Sent: Tuesday, November 26, 2002 11:03 AM > > To: Velocity Users List > > Subject: #foreach help needed ... > > > > > > Hi everyone, > > > > I wonder if the following thing is possible, and if it is, > > how to make Velocity do it...(i simplify the real situation & > > use different classes, but the problem is the same): > > > > > > I have one class, say class Person with following fields: > > String name, ArrayList addresses Then I have another class, > > Address, with fields String street, String city - you can > > guess, the ArrayList addresses in Person is filled with > > instances of the class Address. And I have a wrapper ArrayList People. > > > > Now I want to print all the information I have > > so I do > > > > #foreach($person in $people) > > $person.name > > #foreach($address in $person.addresses) > > $address.street > > $address.city > > #end > > #end > > > > However, I do not get the address data ... anyone any idea > > why? I do not have any problems with accessing simple stuf > > like String inside an ArrayList. I also do not have any > > problems with getting the whole Address object (which is, of > > course, gibberish when printed as it is). What I cannot > > achieve is to acces the fields of the Address object from the > > ArrayList .... > > > > Thanks!!! > > > > Jan > > > > > > > > > -- > To unsubscribe, e-mail: <mailto:velocity-user-unsubscribe@xxxxxxxxxxxxxxxxxx> > For additional commands, e-mail: <mailto:velocity-user-help@xxxxxxxxxxxxxxxxxx> > |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: #foreach help needed ...: 00172, Peter Romianowski |
|---|---|
| Next by Date: | RE: #foreach help needed ...: 00172, Peter Romianowski |
| Previous by Thread: | RE: #foreach help needed ...i: 00172, Peter Romianowski |
| Next by Thread: | RE: #foreach help needed ...: 00172, Peter Romianowski |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |