Grails Navigation with Dynamic Values

Posted by TripWired on Stack Overflow See other posts from Stack Overflow or by TripWired
Published on 2010-03-24T23:19:50Z Indexed on 2010/03/24 23:23 UTC
Read the original article Hit count: 304

Filed under:
|
|
|

I'm using the grails navigation plugin and one of the things i want to do is have the menu item have a dynamic number in it for example

static navigation = [
    group:'tabs',
    order:7,
    title:'Mail',
    action:'index',
            subItems: [
        [action:'pending', order:1, title:"Pending"],
        [action:'active', order:10, title:'Active'],
                    [action:'completed', order:11, title:'Completed']
    ]
]

So i want to figure out a way to make the title Mail(3) or Mail(2) based on the amount of messages a user has.

I know this will have to be set in the method or by a service of some sort i'm just not sure how to get it to update.

© Stack Overflow or respective owner

Related posts about grails

Related posts about groovy