File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Getting Indexed properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting Indexed properties " Watch "Getting Indexed properties " New topic

Getting Indexed properties

Paola Orsini L

Joined: Jan 12, 2009
Posts: 4
Hi I had having trouble retrieving the values of the indexed properties.. I am trying to created a shoping cart and have a list of products with their name, id and quantity, the user edit the field quantity but I can not get that value into my form class

private List<Productos> productsList;

public List<Productos> getProductsList()
return productsList;

public void setProductsList(List<Productos> productsList) {
this.productsList = productsList;
public Productos getProducts(int index)
return (Productos) productsList.get(index);

<logic:iterate name="products_form" property="productsList" indexId="index" id="products" >
<td><table cellpadding=1 cellspacing=1>
<H1 Style="Font: 10px Verdana;color:#D00000">Bsf. <bean:write name="products" property="costo" /></H1>
<td><H1 Style="Font: 10px Verdana;color:#787878">cant <html:text name="products" property="cant" size="3" indexed="true" /></ </H1>

<action path="/openProducts" type="" parameter="method" name="products_form" input="/shoppingcar/shopping.jsp" scope="session" validate="false">
<forward name="success" path="/shoppingcar/shopping.jsp" />
<forward name="backlogin" path="/index.jsp"></forward>

when I try to get the new quantities I get null, can some one help
I agree. Here's the link:
subject: Getting Indexed properties
It's not a secret anymore!