DisplayTag
  1. DisplayTag
  2. DISPL-535

I am Using displaytag1.1 . I want to Pass multipple parameters in column url

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: Tag Library
    • Labels:
      None
    • Application server:
      J Boss 1.4.0 RC1

      Description

      My display table i am attaching .

      <display:table name="sessionScope.xandydataList" class="displaytag" pagesize="370" export="false" requestURI="">
      <display:setProperty name="paging.banner.page.selected" value=""></display:setProperty>
      <display:column property="sno" title="Point ID" href="GTBUPDXandYAction.do?method=populateXandY" paramId="xid,yid" paramProperty=":xidList,:yidList" />
      <display:column property="xdatavalueList" title="X Value" />
      <display:column property="ydatavalueList" title="Y Value" />
      </display:table>

      Pleas help me out to Pass multipple paramets .

      In this case I am geting following error ,

      11:01:05,609 ERROR [[action]] Servlet.service() for servlet action threw excepti on javax.servlet.jsp.JspException: ServletException in '/WEB-INF/jsp/GTBUPD/GTBUPDXndYUpdate.jsp': Error looking up property ":xidList,:yidList" in object type "co m.videocon.model.DataValueContent". at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(Inser
      tTag.java:964) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:503) at org.apache.jsp.WEB_002dINF.layout.siteLayout_jsp._jspx_meth_tiles_ins
      ert_3(org.apache.jsp.WEB_002dINF.layout.siteLayout_jsp:767)
              at org.apache.jsp.WEB_002dINF.layout.siteLayout_jsp._jspService(org.apac
      he.jsp.WEB_002dINF.layout.siteLayout_jsp:321)

        Activity

        Hide
        diwa added a comment -
        Even though displaytag doesnt provide straight forward method to address this porblem, we have a workaround for this.

        Here is the example according to your scenario,
         you have to include id attribute in display:table tag and jstl tags can be used to achieve what you are looking for.

        display:table name="sessionScope.xandydataList" id="xyList" class="displaytag" pagesize="370" export="false" requestURI="">
        <display:setProperty name="paging.banner.page.selected" value=""></display:setProperty>
        <display:column title="Point ID">
          <a href="sampleJavaScriptFunction(<c:out value="${xyList.sno}"/>,<c:out value="${xyList.x}"/>,<c:out value="${xyList.y}"/>)"><c:out value="${xyList.sno}"/></a>
        </display:column>
        <display:column property="xdatavalueList" title="X Value" />
        <display:column property="ydatavalueList" title="Y Value" />
        </display:table>


        and in javascript it should be in this way.

        <script language="JavaScript">
         function sampleJavaScriptFunction(s,x,y){
             location.replace("GTBUPDXandYAction.do?method=populateXandY&s="+s"&x="+x+"&y="+y);
        }
        </script>

        Let me know if u have problems implementing it!

        thanks
        diwa
        Show
        diwa added a comment - Even though displaytag doesnt provide straight forward method to address this porblem, we have a workaround for this. Here is the example according to your scenario,  you have to include id attribute in display:table tag and jstl tags can be used to achieve what you are looking for. display:table name="sessionScope.xandydataList" id="xyList" class="displaytag" pagesize="370" export="false" requestURI=""> <display:setProperty name="paging.banner.page.selected" value=""></display:setProperty> <display:column title="Point ID">   <a href="sampleJavaScriptFunction(<c:out value="${xyList.sno}"/>,<c:out value="${xyList.x}"/>,<c:out value="${xyList.y}"/>)"><c:out value="${xyList.sno}"/></a> </display:column> <display:column property="xdatavalueList" title="X Value" /> <display:column property="ydatavalueList" title="Y Value" /> </display:table> and in javascript it should be in this way. <script language="JavaScript">  function sampleJavaScriptFunction(s,x,y){      location.replace("GTBUPDXandYAction.do?method=populateXandY&s="+s"&x="+x+"&y="+y); } </script> Let me know if u have problems implementing it! thanks diwa
        Hide
        sachin sharma added a comment -
        This will work fine but while exporting in any formate <a href="sampleJavaScriptFunction(<c:out value="${xyList.sno}"/>,<c:out value="${xyList.x}"/>,<c:out value="${xyList.y}"/>)"><c:out value="${xyList.sno}"/></a> will also shown with column value
        Show
        sachin sharma added a comment - This will work fine but while exporting in any formate <a href="sampleJavaScriptFunction(<c:out value="${xyList.sno}"/>,<c:out value="${xyList.x}"/>,<c:out value="${xyList.y}"/>)"><c:out value="${xyList.sno}"/></a> will also shown with column value

          People

          • Reporter:
            Praveen K
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 30 minutes
              30m
              Remaining:
              Remaining Estimate - 30 minutes
              30m
              Logged:
              Time Spent - Not Specified
              Not Specified