<nested:radio property="sendFlag" value="Yes" onclick="showDiv();" />Yes<nested:radio property="sendFlag" value="No" onclick="hideDiv();" />No
The above code defaults to No, on my jsp. Is there 开发者_运维问答a way in which I can allow the Yes button to be selected by default
On your ActionForm
where sendFlag
attribute is found, do this:
private boolean sendFlag = true;
If that doesn't work, override the reset()
method by setting the sendFlag
to true.
That way, when Struts renders the sendFlag
, it will tick it.
精彩评论