Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Expression in PossibleValues.invalidValueMessage()
Expression in PossibleValues.invalidValueMessage() [message #1241129] Fri, 07 February 2014 14:21 Go to next message
Andreas Weise is currently offline Andreas WeiseFriend
Messages: 37
Registered: January 2014
Is there a reason why an expression can not be used for 'invalidValueMessage' on the @PossibleValues annotation. The @Validation.message() resolves any expression used in the text.

Currently the text is passed directly to the MessageFormat object:

Caused by: java.lang.IllegalArgumentException: can't parse argument number  Parent.Id == null ? "" : concat("' for", Parent.Id, "'") 
	at java.text.MessageFormat.makeFormat(
	at java.text.MessageFormat.applyPattern(
	at java.text.MessageFormat.<init>(
	at java.text.MessageFormat.format(
	... 153 more

When using Possible Values within tables, it is essential to supply an identifier where the error occurs.
Re: Expression in PossibleValues.invalidValueMessage() [message #1241296 is a reply to message #1241129] Fri, 07 February 2014 19:27 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
@PossibleValues support predates Sapphire EL. I does make sense to change it to use EL instead of relying on MessageFormat. Please open an enhancement request.
Previous Topic:Keyword final on StandardXmlValueBindingImpl
Next Topic:Radio Button Group with Possible Value Service
Goto Forum:

Current Time: Sun Jul 14 10:44:03 GMT 2024

Powered by FUDForum. Page generated in 0.03283 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top