[
http://www.stripesframework.org/jira/browse/STS-914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031#comment-13031
]
Brandon Goodin commented on STS-914:
------------------------------------
It is a matter of consistency. Given the above crude scenario, if I were to
manually select the radio with a value of "" and clicked submit the empty
myRadioValue would be sent along the request. Stripes makes an intentional
decision to interpret the "" myRadioValue request parameter as a null. But, it
does not make an intentional decision to interpret the null as an "" when
displaying the form.
> Radio Button Is not Selected with Null
> --------------------------------------
>
> Key: STS-914
> URL: http://www.stripesframework.org/jira/browse/STS-914
> Project: Stripes
> Issue Type: Bug
> Components: Tag Library
> Affects Versions: Release 1.5.7
> Environment: All operating systems
> Reporter: Brandon Goodin
> Labels: taglib
>
> When a value is null and a radio button is setup with a value="" attribute
> the radio button is not selected.
> public MyAction extends BaseAction {
> private Integer myRadioValue;
> ...
> public Resolution brokeRadio() {
> myRadioValue = null;
> return new ForwardResolution("brokeradio.jsp");
> }
> ...
> public Integer getMyRadioValue() {
> return myRadioValue;
> }
> public void setMyRadioValue(Integer myRadioValue) {
> this.myRadioValue = myRadioValue;
> }
> }
> <label><stripes:radio name="myRadioValue" value=""/>Null</label> <-- IS NOT
> SELECTED EVEN THOUGH myRadioValue is null
> <label><stripes:radio name="myRadioValue" value="1"/>1</label>
> <label><stripes:radio name="myRadioValue" value="2"/>2</label>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development