java spring filling form with values at first request
-
27-10-2019 - |
سؤال
Hallo,
I am using a extended SimpleFormController
and I override the formBackingObject
-method. In my jsp form I would like to access the object from formBackingObject
, but I can't find any way to touch it. ModelAndView
lets you give the object (model) a name, that it can be accessed by in the jsp (with EL or taglibs). This concept is missing here.
Is formBackingObject
the wrong method to override or am I just to stupid to access the object in jsps?
Thanks
المحلول
The solution was quite easy:
I'm doing it the right way, annotation would be a different valid approach.
The solution was to give the bean a commandName property in the app-servlet.xml.
لا تنتمي إلى StackOverflow