0

I've tried any number of searches looking for an actual definition/description of just what is legal as a Spring form path and I cannot find anything. i.e.

<form:select path="What can I put here?">.

The closest I've been able to find is the table on this page: http://docs.spring.io/spring/docs/2.5.x/reference/validation.html

Table 5.1 gives "examples", but they are only examples.

I really am looking for a definitive explanation of exactly what is legal in a Spring path and also whether any of those are limited to certain versions. I realize this is edging close to asking for favorite off-site resources but I'm looking for the information or links to the official documentation that covers this, not random tutorials, so it should be on topic. I can find plenty of tutorials online but I'm looking for complete reference not a basic introduction.

I'm working on a project using spring-core-2.5.3.jar, I'd really like to find out what is possible in that version although having reference material for more current Spring versions would be good too. I don't know how possible it will be to get an upgrade of Spring done on this project unfortunately.

To be clear - I'm aware that you can access the property String getFoo() using the path "foo". That in some versions of Spring (which?) you can access the first element of String[] getBar() using "bar[0]", etc.

But what are the limitations on this, are there any other things you can do?

Does it support maps and sets?

If it's a complex thing like Map<String,List[Integer]> oof can you do oof["test"][3] as the path?.

Basically the path supports a lot more than just the simple property reading but I can't find anything telling me just what the options and limitations are. Rather than just trying things and seeing what works and hoping I think of everything I'd really like to have a comprehensive list of some kind showing me just what my options are.

Tim B
  • 40,716
  • 16
  • 83
  • 128

1 Answers1

2

Its the reference to the comand object property you want to reference by that field

so if its MyCommand.getCheddar()

you write "cheddar" in path. This is part of spring-mvc, not core spring. It uses the standard convention

Community
  • 1
  • 1
NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
  • Yes. But if it's String[] cheddars you can also do chedder[0] - if it's some collections (which?) you can maybe do the same. If it's a complex thing like Map can you do chedder["cheese"][3]. Basically the path supports a lot more than just the simple property reading but I can't find anything telling me just what the options and limitations are. – Tim B May 23 '14 at 10:03