Your Example still Failed.  I received a no 'getter' method found for property 
Description.  As suggested I found the user guide and the logic below seems to be the 
proper equilvalent syntax of the scriptlet loop sample.  Does anyone else have further 
insight on the appropriate way to return a set of JavaBeans?  I am using JavaBeans to 
represent the Model and often want to return an array of them.  I don't use the 
ActionForm beans for this purpose as best practices indicate that you should not use 
the actionform as your model which makes perfect sense.  I was just confused as to the 
most efficient mechanism for passing the model back to the JSP page to render.  
Currently most of my business logic is design to bringback Javabean[] arrays when sets 
of data (not SQL Data, but various search engine results being consolidated into one 
searchResultBean)  are involved

<%
SearchResultBean[] c = (SearchResultBean[]) session.getAttribute("results");

for (int x = 0; x < c.length; x++){
  out.println(c[x].getDescription());
  
}
%>

<logic:iterate collection="results" id="result">
   <bean:write name="result" property="description"/>
</logic:iterate>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3510.1100" name=GENERATOR></HEAD>
<BODY style="FONT: 10pt Tahoma; MARGIN-LEFT: 2px; MARGIN-TOP: 2px">
<DIV>Your Example still Failed.&nbsp; I received a no 'getter' method found for 
property Description.&nbsp; As suggested I found the user guide and the logic 
below seems to be the proper equilvalent syntax of the scriptlet loop 
sample.&nbsp; Does anyone else have further insight on the appropriate way to 
return a set of JavaBeans?&nbsp; I am using JavaBeans to represent the Model and 
often want to return an array of them.&nbsp; I don't use the ActionForm beans 
for this purpose as best practices indicate that you should not use the 
actionform as your model which makes perfect sense.&nbsp; I was just confused as 
to the most efficient mechanism for passing the model back to the JSP page to 
render.&nbsp; Currently most of my business logic is design to bringback 
Javabean[] arrays when sets of data (not SQL Data, but various search engine 
results being consolidated into one searchResultBean)&nbsp; are involved</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;%<BR>SearchResultBean[] c = (SearchResultBean[]) 
session.getAttribute("results");</DIV>
<DIV>&nbsp;</DIV>
<DIV>for (int x = 0; x &lt; c.length; x++){<BR>&nbsp; 
out.println(c[x].getDescription());<BR>&nbsp; <BR>}<BR>%&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;logic:iterate collection="results" id="result"&gt;<BR>&nbsp;&nbsp; 
&lt;bean:write name="result" 
property="description"/&gt;<BR>&lt;/logic:iterate&gt;<BR></DIV></BODY></HTML>

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

Reply via email to