Ignore:
Timestamp:
Oct 3, 2010, 10:57:45 PM (14 years ago)
Author:
gav
Message:

Small change to custom jasperButtons taglib.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/taglib/CustomTagLib.groovy

    r667 r672  
    201201    def jasperButtons = {attrs ->
    202202        if(!attrs['format']){throw new Exception(message(code:"jasper.taglib.missingAttribute", args:'format'))}
    203         if(!attrs['formName']){throw new Exception(message(code:"jasper.taglib.missingAttribute", args:'formName'))}
    204         String formName = attrs['formName']
     203        if(!attrs['jasper']){throw new Exception(message(code:"jasper.taglib.missingAttribute", args:'jasper'))}
     204        String jasper = attrs['jasper']
    205205        String buttonClass = attrs['class'] ?:  "jasperButton"
    206206        String format = attrs['format'].toUpperCase()
     
    230230            def fmt = it.trim()
    231231            out << """
    232                         <a href="#" class="${buttonClass}" title="${it.trim()}" onClick="return submit_jasperForm('${formName}', '${fmt}')">
     232                        <a href="#" class="${buttonClass}" title="${it.trim()}" onClick="return submit_jasperForm('${jasper}', '${fmt}')">
    233233                        <img border="0" src="${imgSrc}"${heightAttr} /></a>
    234234                        """
Note: See TracChangeset for help on using the changeset viewer.