Good point but that is the intended behavior. Good is a composite bean
that holds the good itself and other stuff hence the description another
level deep as in item[0].getGood().getDescription() as you pointed out
correctly.
I tried your suggestion anyhow with the same result. I also tried to
render one atomic field only from item as in:
<bean:write name="item" property="sku" />
with same resulting exception. I can't figure out why 'item' is out of
scope


-----Original Message-----
From: Kipnis, Adam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 12:11 PM
To: Emmanuel Bridonneau
Subject: RE: puzzled with id


Hey. It looks like the problem is in your propery attribute.
property="good.description" is equivalent to calling
item[0].getGood().getDescription(). Try just property="description".

-----Original Message-----
From: Emmanuel Bridonneau [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 12:06 PM
To: 'Struts Users Mailing List' (E-mail)
Subject: puzzled with id


hi all,
Like all developers, I am trying to figure out why things aren't
happening.
my jsp uses an iterate tag.
<logic:iterate id="item" name="submitForm" property="goods">
  <td valign="top"><b>good description:<bean:write name="item"
property="good.description"/></b>
</logic:iterate>

I assume "item" is a local variable constructed to hold elements from
the java.util.List goods from the form in scope. So I suppose, it oculd
be anything. However, when trying to render its properties, I get an
error even when specifying its type:
javax.servlet.ServletException: Cannot find bean item in scope null at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:457)
On the other hand, this java code works fine:
<%
SubmitForm myform = (SubmitForm)(request.getAttribute("submitForm"));
java.util.List goods = myform.getGoods();   PABean pabb =
(PABean)(goods.get(0));
out.print("good description = "+pabb.getDescription());
%>

Are there extra steps I am missing? (I am using JBoss w/catalina)

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

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

Reply via email to