Skip to content

Commit 93d249c

Browse files
author
graeme
committed
fix for GRAILS-683
git-svn-id: https://svn.codehaus.org/grails/trunk@2979 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d
1 parent 96b5621 commit 93d249c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/grails/grails-app/taglib/FormTagLib.groovy

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,14 @@ class FormTagLib {
414414
def currencySelect = { attrs, body ->
415415
if(!attrs['from']) {
416416
attrs['from'] = ['EUR', 'XCD','USD','XOF','NOK','AUD','XAF','NZD','MAD','DKK','GBP','CHF','XPF','ILS','ROL','TRL']
417-
}
418-
def currency = (attrs['value'] ? attrs['value'] : Currency.getInstance( RCU.getLocale(request) ))
419-
attrs['value'] = currency.currencyCode
417+
}
418+
try {
419+
def currency = (attrs['value'] ? attrs['value'] : Currency.getInstance( RCU.getLocale(request) ))
420+
attrs.value = currency.currencyCode
421+
}
422+
catch(IllegalArgumentException iae) {
423+
attrs.value = null
424+
}
420425
// invoke generic select
421426
select( attrs )
422427
}

0 commit comments

Comments
 (0)