struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sri Sankaran" <Sri.Sanka...@sas.com>
Subject RE: <nested:iterate> & building columns
Date Fri, 18 Oct 2002 21:05:53 GMT
With the version of the <nested> extension I am using in Struts 1.0, the method that
returns a collection *has* to return an Object[].  I believe that restriction has been lifted
for v1.1bx.  So, if you are using v1.0, I would recommend writing a simple wrapper that returns
an Object[]; something like

public Object[] getInformationSessionsArray() {
  return getInformationSessions().toArray();
}

A small comprise.

Sri

-----Original Message-----
From: Adam Sherman [mailto:adam@teachandtravel.com] 
Sent: Friday, October 18, 2002 4:10 PM
To: Struts Users Mailing List
Subject: Re: <nested:iterate> & building columns


Sri Sankaran wrote:
 > Re: NullPointerException A: My guess is that the object returned by a  > getLocation()
call on the objects in your informationsessions  > collection is null.  The code block

OK, after many loops and out.println's, I've established that all the 
data is there.

A few things of note:

<nested:iterate id="dates" name="currentSchedule">
	<nested:write property="date"/>
	<blockquote>
		<nested:iterate property="informationsessions">
			<nested:write property="location.city"/><br>
		</nested:iterate>
	</blockquote>
</nested:iterate>

- currentSchedule is a List of MyDates
- date.getInformationSessions() returns a Set. (Is this OK?)

So, I verified that the data is there. But I still get a 
NullPointerException, therefore I must be trying to pull data from the 
wrong spot in the structure. )-:

Thanks,

A.

-- 
Adam Sherman
Software Developer
Teach and Travel Inc.
+1.613.241.3103



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message