Project

General

Profile

« Previous | Next » 

Revision 1956

Added by Matt Jones over 20 years ago

Enabled stylesheet parameters to be passed through metacat even when the
'query' function is called. Previously, query would interpret all
parameters except a few hardcoded ones to be pathexpressions that should be
built into a squery. Now, metacat.properties contains a new configuration
parameter called "query.ignored.params" which is a comma separated list of
paramters that should be passed through DBQuery.createSQuery without being
interpreted as a path expression. This allows these additional paramters to
be used in stylesheets and other places (html files) to customize the L&F
of particular skins.

The feature was implemented in order to allow the 'enableediting' parameter
for resultset.xsl to be passed through metacat without altering the query.
This parameter, when set to true, causes an 'edit' and 'delete' button to be
included for each record in the resultset. These buttons call the registry
edit and delete functions for the OBFS and (later) NRS and other registries.

View differences:

MetaCatServlet.java
610 610
      outPutTime = System.currentTimeMillis()/1000;
611 611
      MetaCatUtil.debugMessage("Output time: "+(outPutTime-toStringTime), 30);
612 612
    } else {
613
      transformResultset(resultdoc, response, out, qformat, sessionid);
613
      transformResultset(resultdoc, response, out, qformat, sessionid, params);
614 614
      outPutTime = System.currentTimeMillis()/1000;
615 615
      MetaCatUtil.debugMessage("Output time: "+(outPutTime-toStringTime), 30);
616 616
    }
......
641 641
      response.setContentType("text/xml");
642 642
      out.println(resultdoc);
643 643
    } else {
644
      transformResultset(resultdoc, response, out, qformat, sessionid);
644
      transformResultset(resultdoc, response, out, qformat, sessionid, params);
645 645
    }
646 646
  }
647 647

  
......
733 733
  protected void transformResultset(String resultdoc,
734 734
                                    HttpServletResponse response,
735 735
                                    PrintWriter out, String qformat,
736
                                    String sessionid)
736
                                    String sessionid, Hashtable params)
737 737
  {
738 738

  
739 739
    try {
......
741 741
      DBTransform trans = new DBTransform();
742 742
      response.setContentType("text/html");
743 743
      trans.transformXMLDocument(resultdoc, "-//NCEAS//resultset//EN",
744
                                 "-//W3C//HTML//EN", qformat, out, null,
744
                                 "-//W3C//HTML//EN", qformat, out, params,
745 745
                                 sessionid);
746 746

  
747 747
    }

Also available in: Unified diff