Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i create a link in displaytag?

I want to create edit , delete link in display tag with struts2. How can i do so ? If anybody knows please help me ....

i am doing this.

<display:column property="id" title="ID" href="details.jsp" paramId="id" />

but the link is not going to details.jsp .It doesn't go anywhere . what can be the possible reason

like image 770
harshalb Avatar asked Dec 06 '22 06:12

harshalb


2 Answers

You can write your stuff within the tag like this:

<display:table id="row" >
    <display:column property="id" title="ID" paramId="id"  > 
        <a href="details.jsp?${row.id}">Details</a>
    </display:column>
</display:table>
like image 105
HaBaLeS Avatar answered Dec 15 '22 15:12

HaBaLeS


It is done by the following code.

<display:column  title="Edit">
                    <s:url id="updateUrl" action="marketing/update.action">
                        <s:param name="id" value="#attr.countrylist.id" />
                    </s:url>
                    <s:a href="%{updateUrl}" theme="ajax"  targets="countrylist">Update</s:a>
                </display:column>

Thanks for all the answers

like image 32
harshalb Avatar answered Dec 15 '22 15:12

harshalb