Hi,

I've got a problem with a stripes:select tag.
I'm using it to show a customer a list of items in his shopping cart. The
amount of each item can be selected via a dropdown. The code looks like
this:

<c:forEach items="${cartItemList}" var="cartItem" varStatus="status">

... other stuff ...

<stripes:select name="cartItem.amount" class="direct-cart-item-amount"
id="input_amount_${status.index}" value="${cartItem.amount}">
 <c:forEach begin="1" end="10" varStatus="statusSelect">
<stripes:option
value="${statusSelect.count}">${statusSelect.count}</stripes:option>
 </c:forEach>
</stripes:select>

... more other stuff ...

</c:forEach>

Now, my problem is this:
When I remove an Item from the top of the list, the page is reloaded with
the new list. But the amount dropdown fields are not updated correctly. The
dropdown field at the top still displays the value for the removed item.

Example:
- 2 CartItems: Apples (Amount 3) and Bananas (Amount 1)
- I remove the item Apples from the list, the page is reloaded
- The page shows: 1 CartItem: Bananas (Amount 3) even though the actionBean
has the correct amount (1).

I checked, and ${cartItem.amount} is 1 in this case.

How come that the value selected in the dropdown is wrong?

Any help is appreciated,

Regards,
Sven Kiesewetter
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to