Francesco
Francesco

Reputation: 2382

g:sortableColumn -> Error executing tag <g:sortableColumn>: null

I'm having hard problems with the and I don't understand what is wrong. I think it has to do with the FilterPane plugin, which I also use, but I'm not sure...

Here the code in my list.gsp:

    <table>
      <thead>
        <tr>
           <g:sortableColumn property="id" title='${message(code:"doi.doi.string")}' params="${filterParams}"/>               
           <g:sortableColumn property="url" title='${message(code:"doi.doi.url")}' params="[filterParams]"/>
           <g:sortableColumn property="registrationDate" title='${message(code:"doi.doi.registration.date")}' params="${filterParams}"/>
           <g:sortableColumn property="lastUpdateDate" title='${message(code:"doi.doi.last.update.date")}' params="${filterParams}"/>
           <g:if test="${session.user.isAdmin}">
              <g:sortableColumn property="owner" title='${message(code:"doi.doi.user")}' params="${filterParams}"/>
           </g:if>                   
       </tr>
      </thead>
      ...
      <div class="paginateButtons">
        <g:paginate total="${doiCount == null ? '0' : doiCount}" params="${filterParams}"/>
        <filterpane:filterButton text='${message(code:"button.search")}'/>
        <filterpane:filterPane domain="Doi"
                    titleKey="fp.tag.filterPane.titleText"
                    additionalProperties="id"
                    dialog="true"
                    excludeProperties="OAIServerLocation, source,title, creator, dimension, value, unit, contributor, publisher, language,
                                                          description, structuralType, mode, resourceType, registrationAgency, issueDate, issueNumber,
                                                          publicationDate, publicationPlace, discipline, relatedDOIs, relatedDOI, relationType"
                    associatedProperties="owner.lastName"
                    filterPropertyValues="${[registrationDate:[years:2013..2009,precision:'day'],
                                                               lastUpdateDate:[years:2013..2009,precision:'day']]}"/>
      </div>

and here what I defined in the controller;

class DoiController
{
  ...
  def filterPaneService;
  ...
  def filter =
    {
      if(!session.user)
      {
          loadUser();
      }

      flash.args = [session.user.firstName, session.user.lastName];

      if(!params.max)
      {
          params.max = 20;
      }

      render( view:'list', model:[doiList: filterPaneService.filter(params, Doi), 
      doiCount: filterPaneService.count(params, Doi), 
      filterParams: org.grails.plugin.filterpane.FilterPaneUtils.extractFilterParams(params), params:params])
    }
  ...

When I start the application in the browser i get:

Error 500:
Servlet: gsp
URI: /doi/
Exception Message:
Caused by: Error processing GroovyPageView: Error executing tag &lt;g:sortableColumn&gt;: null at C:/eclipse-jee-galileo/Workspace/doi/grails-app/views/doi/list.gsp:48
Class: /WEB-INF/grails-app/views/doi/list.gsp
At Line: [-1]
Code Snippet:

and line 48 is <g:sortableColumn property="url" title='${message(code:"doi.doi.url")}' params="[filterParams]"/>

If I remove this line, then it works...

Can someone please help me? I'm really desperate!! If other informations are needed, just ask.

I'm using grails 1.3.7 and Filterpane-Plugin 2.0.1.1

Upvotes: 0

Views: 1345

Answers (1)

Kelly
Kelly

Reputation: 3709

Sorry if you've already solved this - the only thing I notice is that in that line you have

    params="[filterParams]"

instead of

    params="${filterParams}"

Upvotes: 1

Related Questions