Gorm findAllBy inside gsp doubt

Posted by xain on Stack Overflow See other posts from Stack Overflow or by xain
Published on 2010-03-22T18:54:40Z Indexed on 2010/03/22 19:01 UTC
Read the original article Hit count: 430

Filed under:
|
|
|

Hi, can anybody tell me why this works

<g:each var="n" in="${com.pp.News.list()}">
 <h2>${n.t}</h2>
 <p>${n.tx}</p>
</g:each>

but this doesn't ?

<g:set var="news" value="${com.pp.News.findAllByShow(true,[sort:'prio', order:'desc',max:5])}" />
<g:each var="n" in="news">
   <h2>${n.t}</h2>
    <p>${n.tx}</p>
  </g:each>

Part of the exception is

Exception Message: No such property: t for class: java.lang.String 

How can I make it work?

Thanks

© Stack Overflow or respective owner

Related posts about grails

Related posts about gsp