Announcement Announcement Module
Collapse
No announcement yet.
nested boolean bind fails Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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>>

    Comment

    Working...
    X