It doesn't seem to work.

I took the stripes calculator sample app and added the following lines:


ActionBean:

private String operationStr = "1";
public String getOperationStr() { return operationStr; }
public void setOperationStr(String operationStr) { this.operationStr =  
operationStr; }

private Boolean operationBool = true;
public Boolean getOperationBool() { return operationBool; }
public void setOperationBool(Boolean operationBool) {  
this.operationBool = operationBool; }


JSP:

<stripes:radio name="operationStr" value="1" />One
<stripes:radio name="operationStr" value="2" />Two

<stripes:radio name="operationBool" value="true" />True
<stripes:radio name="operationBool" value="false" />False


But when I launch the JSP, all radio buttons are unselected.



Quoting Mike McNally <emmecin...@gmail.com>:

> Stripes will set a radio button to "checked" when its value matches
> the value of the property on the action bean.  Thus, if you've got
>
>     <s:radio name='xyz' value='1'>
>
> and your action bean has an "xyz" property whose value is 1, then that
> radio button will be checked.
>
>
> On Mon, Jun 25, 2012 at 12:25 PM, William Krick <kr...@3feetunder.com> wrote:
>> I can't seem to get the stripes:radio control to bind to my ActionBean.
>>
>> Whenever my JSP loads, none of the radio buttons are selected.  I
>> would like to be able to specify a default value so that when the JSP
>> is loaded, one of the radio buttons are selected.
>>
>> The stripes documentation indicates that the the "checked" value is
>> pulled from the ActionBean, but I'm not seeing that happen.
>>
>> Is there something subtle about the way stripes radio buttons work or
>> the syntax that I'm missing?
>>
>> I've tried to find working sample code on the internet, but everyone
>> seems to be asking the same question as me but not getting any answers.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
> --
> Turtle, turtle, on the ground,
> Pink and shiny, turn around.
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to