1

i have following data to show in table form. When I click on update button, all the name fields turn into input form whereas I wanted only that particular record to get input where the update button is shown. What should be done in this case?

<display:column  title="Name" >
    <c:choose>
        <c:when test="${param.button == 'Update'}">
            <input type="input" name="name" value="${record.name}"/>
        </c:when>
        <c:otherwise>
        <c:out value="${record.name}"></c:out>
        </c:otherwise>
    </c:choose>
    </display:column>
    <display:column media="html">
        <c:choose>
            <c:when test="${param.button == 'Update' }">
                    <input type="hidden" name="name" value="${record.name}" />
                    <input type="submit" name="button" value="Save" />
            </c:when>
            <c:otherwise>
                <input type="submit" name="button" value="Update" />
            </c:otherwise>
        </c:choose>
        <c:choose>
            <c:when test="${param.button == 'Update' }">
                <input type="submit" name="button" value="Cancel" />
            </c:when>
            <c:otherwise>
                <input type="button" value="View"/>
            </c:otherwise>
        </c:choose>
    </display:column>
</display:table>
Imam Bux
  • 1,006
  • 11
  • 27
  • Can you elaborate a little more on what the problem is and what the desired outcome should be? – Shaggy May 12 '15 at 18:06

0 Answers0