2012-02-08 48 views

回答

1

Limitation

的CRUD模块只显示在 两个实体的一个双向的关系:不具备的mappedBy属性之一。

如果需要,请使用自定义标签。
类似于:

<div id="crudListTable"> 
    #{crud.table fields:['name','description','comments']} 
    #{crud.custom 'description'} 
     #{if object.description}${object.description.length() > 50 ? object.description[0..50] + '…' : object.description}#{/if} 
    #{/crud.custom} 
    #{crud.custom 'comments'} 
     #{list items:object.comments, as:'comment'} 
      ${comment.description}/
     #{/list} 
    #{/crud.custom} 
    #{/crud.table} 
</div> 
相关问题