Hardik Patel
Hardik Patel

Reputation: 937

g:message multiple argument passing

I have 3 values coming from model of my controller. I want to pass those argument in the args of g:message tag in my gsp page.

Like

<g:message code="test.pricing.essentialdetails" args="${[freePages,currencySymbol,periodicFee]}"/>

My messages.properties has the below entry

test.pricing.essentialdetails=provides {0} pages and is just {1} {2} per month.

How to pass multiple arguments in g:message in gsp page?

Upvotes: 4

Views: 5420

Answers (1)

uladzimir
uladzimir

Reputation: 5689

You can try to pass args as list args="[freePages,currencySymbol,periodicFee]"

And final:

<g:message code="test.pricing.essentialdetails" args="[freePages,currencySymbol,periodicFee]"/>

Upvotes: 8

Related Questions