• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

application.properties

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, anyone knows how to modify the numeric values into the file "application.properties" !!!
p.e.
errors.range={0} is not in the range {1} through {2}.

{1} & {2} !
thanks
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well typically, the values {0}, {1}, etc...represent words or phrases that you need to supply.

For your example...

errors.range={0} is not in the range {1} through {2}.

Could actually read something like this: 11 is not in the range 1 through 10.

I personally only know how to do this inside the validation framework that comes with struts...

validator.xml


then in your application.properties file you would need to have both <yourForm>.lowvalue.displayname, and <yourForm>.highvalue.displayname defined.



Hopefully, this sends you in the right direction.

Best of Luck,

Nate
 
Mike Floyd
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot,
now a new problem rises, i've tried to implement a validator that compare two fields,(p.e. 2 passwords).
it doesn't works, but i've not succesful to do this, above i report the pieces od code that would have to work for this objective !

file: validation.xml


file: validation-rules.xml



class utils.ValidatorUtil


file Application.properties



Anyone can see where is the error?
Thanks in advance !!!
 
Mike Floyd
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ok i'solved, the name of varible into validation.xml didn't correspont to the value defined into the method validateTwoFields.
BYE
 
Nathan Hook
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cheers,

Nate

 
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic