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.gspI'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.
精彩评论