To all, not even sure this is a
bug or am I doing something wrong, but I just can get the value
selected properly. The code fragment is as follows: <s:select class="fields" name="strike" value="${strike}"> <s:options-collection collection="${strikes}"/> </s:select> The form submits to an action bean that has getters and setters for the "private double strike". ${strike} is being set via jsp scriplet and depends on several conditions. In the essence it is double too. Then it is passed as (bean value overrides other values): pageContext.setAttribute("strikePrice", bean.getStrikePrice()); (where bean is pageContext.findAttribute("actionBean")) or pageContext.setAttribute("strikePrice", quote.getStrikePrice()); ${strikes} is a List<Double> and populated by jsp scriplet and is set via pageContext object. For some reason, s:select tag never does [selected="selected"] on the option. This is really strange as I have a bunch of other selects on the page of Map<Integer, String> and List<Integer> and those work just fine. But when it comes to double, it won't work. And I've tried to write a small page to replicate the problem, couldn't, it worked. I did notice that stripes prints <option value="360">360.0</option> in the option list, see the value and text are different somehow. Could that be the problem? If anyone has any tips it'd be appreciated, so far I'm stuck. Thanks, Daniil |
------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb
_______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users