The options tag can be useful, even if dynamic form binding is not utilized.
It would work, except that OptionsTag
explicitly asks for a form:select
parent element, even if it doesn't need it, as per the following line.
https://github.com/spring-projects/spring-framework/blob/25d7f09f8dacbd51d1551b4d7fed1687b068ec11/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java#L296
The solution: If you only move the aforementioned line to the inside of the else
, it will still work as before, and allow to use an options tag with explicit item list.
Comment From: snicoll
OptionsTag
hasn't moved in years and given the lack of interest for this feature, I am going to close this.