开发者

Grails Taglib for listing the last activities for the current logged user

In my Grails application the relationship between SecUser (Spring Security plugin is used) and Activity is one-to-many.

I want to display the last activities for the currently logged user in index.gsp

I'm thinking to use Grails Taglib to display the newest activities. I don't seek GORM or HQL code but I would like if you can pr开发者_JS百科ovide me with a skeleton for the taglib file I'm trying to create.

For example, what is the best way to output HTML that uses my CSS rules?

How to pass the current logged user to the taglib?


There's no need to pass the user in. Services can be injected into taglibs. Just use the one that Spring Security Core provides. As far as the HTML and CSS there is no way to tell you how to do something that we have no clue what you want to look like. But I'd just use MarkupBuilder to construct my HTML and the resource tag to pull in any styles/scripts that are required.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜