• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

validation.xml

 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was wondering if it's possible to change the validition.xml at run-time e.g. depending on the user that's logged in? So if user A logs in, validation framework has to work with validationA.xml ; if it's user B, than it's validationB.xml

or is their an other alternative (using struts validation framework, not java-code server side) to achieve the following: both users have some coordinates as input-fields, but the ranges of both users are different. So allowed values for userA between 10-100 and userB between 200-500.

Every comment is highly appreciated.
Many thanks already.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Roel...
I think that your idea is possible using the 'pathnames' attribute of the Validator plugin. The pathnames attribute holds a list of the config files for the validator. Depending on the person logging in I think that you could load the appropriate ones using the getPathnames() and setPathnames() methods of the org.apache.struts.validator package. For any further information, I suggest that you consult the Javadocs and the API documentation for Struts because I haven't tried it out, but it sounds logically and technically feasible. Hope you can do it and if u can, plz do shoot of a post or mail me at abhishek.dwaraki@gmail.com telling me the method.
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for your reply, but i have to tell you that it was a question for something in the long (maybe even very long) future. it might occur that it isn't necessary at all, so it depends on futur user needs...

but if i need to use it, i'll post the method to your email or just here on the forum

Greetz
Roel
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic