Grails Editing Flash Delete Message

前端 未结 3 1748
刺人心
刺人心 2021-01-17 06:05

Hi am new at Grails i have implemented a delete action that deleted messages in an inbox,, but now i want to change the flash message to display \"2 Messages deleted\" not

3条回答
  •  逝去的感伤
    2021-01-17 07:06

    in code:

    int count = 5 //number of deleted messages
    
    flash.message = message(code: 'default.deleted.messages', args: [message(code: 'messages.label', default: 'Messages'), count])
    

    in messages.properties:

    messages.label=Messages
    default.deleted.messages={1} {0} deleted
    

提交回复
热议问题