Using Ajax Display Tag with Tree

Amit C
2008-08-12
2013-01-31
  • Amit C
    Amit C
    2008-08-12

    I have a requirement where ajax display tag table is updated depending on a node selected in tree structure with no data shown in table when user first comes to the screen.

    Now the question, is it possible to refresh ajax display table and pass parameters(not for sorting, pagination). I looked at the Car Service example but could not figure out how to pass parameters in service for ajax display tag.

    Any help/pointers would be appreciated.

    thanks,
    Amit

     
    • Fredy Posada
      Fredy Posada
      2009-06-27

      Yes iti it possible to do it.  All you have to do is to associate an ajaxtags:htmlContent to the html:select, as shown in the following example.

      <html:select property="dbID" styleId="dbID">
                              <html:option value="0">--</html:option>
                              <html:optionsCollection name="selectList" label="dbName"
                                  value="id" />
                          </html:select><ajaxtags:htmlContent source="dbID" target="KDtableViewDiv"
                              baseUrl="${contextPath}/administration/structure/Schema.do?method=viewAjax"
                              parameters="dbID={dbID}" />

      After that you will to create the displaytag:

      <ajaxtags:displayTag id="KDtableViewDiv">
          <display:table name="list" requestURI="${contextPath}/administration/structure/Schema.do?method=viewAjax"
      .
      .
      .
      </display:table>
      </ajaxtags:displayTag>

      Best Regards

      Fredy Posada