aspose file tools*
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
Author

Getting Indexed properties

Paola Orsini L
Greenhorn

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

ProductsForm:
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);
}

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

struts-config.html
<action path="/openProducts" type="com.jnj.actions.ProductsAction" 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>
</action>

when I try to get the new quantities I get null, can some one help
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Indexed properties