English 中文(简体)
g. 铁路控制清单方法
原标题:grails control list method appearance
  • 时间:2011-10-08 23:40:57
  •  标签:
  • grails

Given the grails dynamic method list() on a domain class, how does one control the appearance of the list elements, but NOT using the toString() method. I.e. in one case I need the list returned to look one way (in my g:select), and in another case, I need it to look another way, from the same domain class, as it is using different fields.

增 编

最佳回答

它希望也能在选择中结束选择。 g:当选,例如

<g:select optionKey="id" optionValue="${{it.title?.toUpperCase()}}" name="book.title" from="${bookList}" />

此前我没有这样做。

问题回答

通过了一份DTOs清单,而不是一份您的域名清单。 然而,DTO需要格式。





相关问题
grails + gwt request handling via controllers

I am new to gwt. I am trying to integrate gwt+grails.Can anybody provide me a good example for handling the request using grails controllers and not a custom servlet.I will be really thankful if ...

Error loading the grails gwt module xml

I ve installed the plugin from this article by Peter http://www.cacoethes.co.uk/blog/groovyandgrails/the-command-pattern-w.... While compile time its not able to find the module file which is present ...

Sorting Objects Based on Custom Domain Class Methods

I have a domain class, in which I ve defined some methods which give the object a score based on different algorithms (eg. popularity). I now want to retrieve a list of these objects sorted by one of ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

Hibernate/GORM: collection was not processed by flush()

I have an integration test in my Grails application that fails when I try to save an entity of type Member invitingMember.save(flush: true) This raises the following exception org.hibernate....

热门标签