Menu

in the liferay portal and post form problem

Help
find
2006-08-29
2012-10-09
  • find

    find - 2006-08-29

    I use the displaytag-1.1.jar and displaytag-portlet-1.1.jar. Now I can sort and page,the result is correct.
    I want to add some serache condition,in the normal jsp and struts, the parameter in the form can be added in the href,after i post the form.

    but in the portal i post the form and the parameter in the form can not be added to sort and page href

    this is my codes
    <html:form action="/search" method="post" styleId="testForm">

        &lt;display:table name=&quot;testList&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;
                       id=&quot;testList&quot; pagesize=&quot;2&quot; class=&quot;list_1&quot;
                       export=&quot;false&quot; sort=&quot;external&quot; partialList=&quot;true&quot; size=&quot;resultSize&quot;&gt;
    
            &lt;display:column property=&quot;testName&quot; headerClass=&quot;sortable&quot;
                            titleKey=&quot;testName&quot; sortable=&quot;true&quot; sortName=&quot;testName&quot;/&gt;
    
            &lt;display:setProperty name=&quot;paging.banner.item_name&quot; value=&quot;test&quot;/&gt;
            &lt;display:setProperty name=&quot;paging.banner.items_name&quot; value=&quot;tests&quot;/&gt;
    
        &lt;/display:table&gt;
    

    </html:form>

     
    • Rick Herrick

      Rick Herrick - 2006-08-29

      If I understand the issue correctly, you want to add the requestURI attribute to the <display:table> tag. This lets you include parameters on the URL, including search parameters. So you'd set the value for the requestUri in your Struts class, set it to a variable in your JSP, then eval that in the tag:

      <% String uri = "/search.do?term=Search%20For%20This"; %>

      <display:table requestURI="<%= uri %>">

      Something like that...

       

Log in to post a comment.