Results 1 to 3 of 3

Thread: How to set a radiobutton in <form:radiobutton/> pre-selected?

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    159

    Default How to set a radiobutton in <form:radiobutton/> pre-selected?

    My code looks as follow:
    Code:
    ...
    		<td>Male<form:radiobutton path="sex" value="M" /></td>
            <td>Female<form:radiobutton path="sex" value="F" /> </td>
    ...
    What I want is: as I start the this page, the radiobutton for "Male" is pre-selected.

    Someone knows the syntas?

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    Initialize your form object with the sex of value M.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jun 2007
    Posts
    159

    Default

    You are right.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •