Results 1 to 2 of 2

Thread: nested boolean bind fails

  1. #1
    Join Date
    Jul 2005
    Posts
    10

    Default nested boolean bind fails

    Any ideas why binding nested boolean properties fails. I have a form bean that has a property Contract which has a boolean properties. Even when checked the value is aways false.


    This does not work. I have even used the nested tag w/o success.

    public class DealerCheckListBean {

    private InstallLoanContract contract;
    private String action;

    // gets and sets....
    }

    <spring:bind path="dealerCheckListBean.contract.signedAppln">
    <input type="hidden" name="_${status.expression}"/>
    <input type="checkbox" name="signedAppln" value="true"
    <c:if test="${status.value}">checked</c:if>/>
    </spring:bind>

    This works

    public class DealerCheckListBean {

    private InstallLoanContract contract;
    private String action;
    private boolean signedAppln;
    // gets and sets....
    }

    <spring:bind path="dealerCheckListBean.signedAppln">
    <input type="hidden" name="_${status.expression}"/>
    <input type="checkbox" name="signedAppln" value="true"
    <c:if test="${status.value}">checked</c:if>/>
    </spring:bind>



    Any suggestions? thanks

    Scott

  2. #2
    Join Date
    Jul 2005
    Posts
    10

    Default my mistake

    using the jpetsore example I found my problem. I was not setting the name correctly


    <input type="checkbox" name="<c:out value="${status.expression}"/>" value="true" <c:if test="${status.value}">checked</c:if>>

Posting Permissions

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