• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

How to Pass arguements in errors.rejectValue()

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can anyone help me on this?

I'm using,

In Java class:


In properties file, I'm using:
prop.fieldName.label=Element Number {0}

In output:
I'm getting: Element Number {0}

Actually, I'm looking for: Element Number 1234

Need urgent help.

Thanks in advance.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you configured a message source?

Try something like this..

 
Siva gurun
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have added those. But still not able to access the default values in front end. Will able to access messages.properties values. But I need to pass my own defined values and the below should print 1234.



Please help me on this.
 
Boris Romashov
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Siva gurun wrote:But I need to pass my own defined values and the below should print 1234.


Default value is the 4th parameter of rejectValue method.
 
reply
    Bookmark Topic Watch Topic
  • New Topic