By the way, BeanFirstPopulationStrategy will be the default in Stripes 1.6 so you won't need any configuration.
Cheers, Freddy http://www.stripesbook.com Sven Kiesewetter <[email protected] writes: - - - Thank you, that was exactly the information I needed! - - SvenOn Tue, Nov 17, 2009 at 3:01 PM, Poitras Christian <Christian.Poitras- 4UibUmh+El2w5LPnMra/[email protected] wrote: - - - - - Is it possible that your population strategy is set to - net.sourceforge.stripes.tag.DefaultPopulationStrategy (default - value)? - - - If so, I suggest you use - net.sourceforge.stripes.tag.BeanFirstPopulationStrategy. - You - can add this to your web.xml StripesFilter configuration: - - <init-param- - <param-name-PopulationStrategy.Class</param-name- - <param-value-net.sourceforge.stripes.tag.BeanFirstPopulationStrategy</param- value- - </init-param- - - - - See http://www.stripesframework.org/display/stripes/Configuration+Reference - - - - Christian - - - From: Sven Kiesewetter - [mailto:[email protected]] Sent: Tuesday, November 17, - 2009 5:44 AMTo: - [email protected]: [Stripes-users] - stripes:select doesn't update value correctly - - - - - 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
