Hello Everyone,

I am pretty much new to appfuse(and Spring) and I am hoping that someone can
help me with the problem that I am encountering at the moment. But wait I
use Spring MVC and Appfuse. The problem is, I have a list coming from a
controller wherein the list contains an object that has members. What I want
to do is to bind a checkbox to the member(named enabled) of the object(named
promoCode). I have the displaytag placed inside the form. My code is this:

<form:form commandName="promoCodeList" method="post"
action="allPromoCode.html" onsubmit="return validatePromoCode(this)"
id="promoCodeForm">

    <display:table name="promoCodeList" cellspacing="0" cellpadding="0"
requestURI=""
        id="promoCodeList" pagesize="25" class="table promoCodeList"
export="true">

        <display:column property="id" escapeXml="true" sortable="true"
            url="/editPromoCode.html" paramId="id" paramProperty="id"
            titleKey="promoCode.id"/>
        <display:column property="code" escapeXml="true" sortable="true"
             titleKey="promoCode.code"/>
        <display:column property="discountAmount" escapeXml="true"
sortable="true"
             titleKey="promoCode.discountAmount"/>
        <display:column escapeXml="true">
            <spring:bind path="promoCode.*">
                <form:checkbox path="enabled" id="enabled"/>
            </spring:bind>
        </display:column>     
        <display:setProperty name="paging.banner.item_name" value="Promo
Code"/>
        <display:setProperty name="paging.banner.items_name" value="Promo
Codes"/>
    </display:table>

    <c:out value="${buttons}" escapeXml="false"/>
</form:form>

Now, when I comment out the binding part, the table appears but when I tried
to uncomment it, the table doesnt show and shows this error:

<pre>javax.servlet.jsp.JspTagException: Neither Errors instance nor plain
target object for bean name 'promoCode' available as request attribute
        at
org.springframework.web.servlet.tags.BindTag.doStartTagInternal(BindTag.java:118)

I would really appreciate any help here everyone. Thanks in advance.

JC
-- 
View this message in context: 
http://www.nabble.com/Spring-MVC%3A-Binding-Objects-With-Data-Coming-From-DisplayTag-list-tf4566300s2369.html#a13034103
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to