I have a displaytag to display results. But in this displaytag, I want the corresponding occid of the row. But I don't know due to some problem, it is showing me the id of the first row only. It works as follows- when i enter a name and click on search , it goes to a servlet which fetches the details and shows in the displaytag. Since i want to edit the details, what I do here is I click on the radio button of a row and click on edit button. The edit button will take the occid and send it to another servlet for futher processing.

  <display:table name="requestScope.List" export="true" class="displaytag" sort="list" decorator="checkboxDecorator" excludedParams="_chk" id="itemName" >
            <display:setProperty name="basic.empty.showtable" value="true"  />

            <%// <display:column  property="id" title="ID" ></display:column> %>
            <display:column  property="occid" title="Occupant ID"  ></display:column>
            <display:column  title="Check" headerClass="sortable">
                <input type="radio"  id="check" name="check" value="${itemName.occid}" />
            </display:column>
            <display:column  property="firstName" title="First Name" ></display:column>
            <display:column  property="lastName" title="Last Name"   ></display:column>
            <display:column  property="sonOf" title="Father's Name"  ></display:column>
            <display:column  property="district" title="District"  ></display:column>
            <display:column  property="village" title="Village"  ></display:column>

          </display:table>
        </p>
        <p>
          <input type="submit" name="EDIT" id="EDIT" value="EDIT" onClick="javascript:checkModify();">
        </p>
Member Avatar for LastMitch

Since i want to edit the details, what I do here is I click on the radio button of a row and click on edit button. The edit button will take the occid and send it to another servlet for futher processing.

@divyang.parmar

There should be another file, this is not the file that you edit, this is the frontend that is display on the website.

for editing i just have to click on edit button. nothing else. @lastmitch

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.