Search code examples
jsp-tagsdisplaytagtabular

Displaytag - How to pass hidden value in url?


   <display:table name="sessionScope.userInbox" pagesize="5" sort="list" cellspacing="10" cellpadding="5">
            <display:column property="aid"  title="" class="hidden"  />             
            <display:column property="from" title="From" sortable="true" />  
            <display:column property="to"   title="To"   sortable="true" />  
            <display:column property="msg"  title="Message" sortable="true"  />  
            <display:column property="status" title="Status" sortable="true" paramId="aid" paramProperty="aid" href="/MsgSystem/adminread" />
   </display:table>

when i click on "status" link then pass "aid" value in url but it is by get method i want to pass hidden in url.


Solution

  • you have added "userInbox"object list to the session scop and try to iterate it using displaytag. This object would be a java bean having getters /setters for properties - (aid,from,to,msg,status)

    you need to change

      <display:column property="status" title="Status" sortable="true" paramId="aid" paramName="aid" href="/MsgSystem/adminread" />
    

    the returned url for that display column will be like this.. /MsgSystem/adminread?aid=1

    more information on this.. http://displaytag.sourceforge.net/11/tut_links.html