Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts - Bean property for html:text property name

843841Jan 9 2005 — edited Feb 15 2005
Hi, I'd like to use a bean property as the name of the property for a html:text element as such:
<logic:iterate id="product" type="app.bean.Product" name="producten">
 <tr>
  <td><bean:write name="product" property="productnaam"/></td>
  <td><bean:write name="product" property="prijs"/></td>
  <%
   params.put ( "id", new Integer(product.getId()) );
  %>  
  <td><html:text property="<%= id %>"/></td>
</logic:iterate>
However, this doesn't seem to work. I want it to generate <input type="text" name="1"/> with 1 being the product id.

I tried the above and also:
  <td><html:text property='<bean:write name="product" property="id"/>' size="10" maxlength="1"/></td>
Neither works, what am I doing wrong?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2005
Added on Jan 9 2005
10 comments
665 views