DisplayTag
  1. DisplayTag
  2. DISPL-468

new feature to allow configurable 'onclick' and 'onkeypress' attributes of export anchor tag

    Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: Export
    • Labels:
      None
    • Application server:
      tomcat

      Description

      Our government client has data entry people who were confused when clicking on an export link would open a document in their current browser window.
      Training hundreds of confused data entry people to open in a new window in IE was prohibitive.

      I added an option to set the onclick and onkeypress attributes of the export anchor in displaytag.properties in order to
      always open the export in a new window (or optionally configure other export anchor features):

      export.anchor.onclick=window.open(this.href); return false;
      export.anchor.onkeypress=window.open(this.href); return false;

      I patched the java to add the onclick and onkeypress attributes to the export anchor only if the property is set. I updated
      the anchor class and supporting classes to add methods to set these attributes of the anchor class.

      Apologies for no test case. If you want to accept my patch, please let me know and I will write the test case + documentation.
      greg dot orlowski at gmail dot com

        Activity

        Hide
        Matt Raible added a comment -
        This patch seems reasonable to me. Please attach a test case and documentation and I'll add it.
        Show
        Matt Raible added a comment - This patch seems reasonable to me. Please attach a test case and documentation and I'll add it.

          People

          • Reporter:
            Greg Orlowski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: