java - struts checkbox problem -
i have checkbox in jsp page. there othe textfields in jsp page. can populate value of textboxs database. name field can fetch value 'myname' database , show in jsp page. can't fetch value of checkbox database. have field agriculture in database , in jsp page. want if value of agriculture in database 1 checkbox of agriculture in jsp page 1 also. , if value 0 checkbox unchecked. how can it. please help. code fragment oof jsp page.
<td><label class="desc"> agriculture</label></td> <td> <html:text property="loanpurposecodeinfodto.agriculture" styleclass="singlelinetextfield" size="30" tabindex="1" ></html:text> <html:checkbox styleid="checkbox_isall" property="loanpurposecodeinfodto.agriculture" ></html:checkbox> </td>
make loanpurposecodeinfodto.agriculture
boolean
variable, , set values true
when value database 1, , false
when database value 0.
Comments
Post a Comment