I’m new to Spring and Spring MVC. I developed some web-apps in ASP.NET and the different approach followed by this framework is confusing me a bit.
Now I’m trying to develop a sample application and I need to change the text of some controls (buttons, labels, etc.).
For example: I have a button that starts/stops a data extraction process. I’d like to set the text of the button to “START” and then when I click it (and the process is started), I’d like to set the button text to “STOP”. Similar changes should be done for several labels.
In ASP.NET I simply set the Text property of each control.
How can I achieve this with Spring MVC, from a controller?
NOTE
This also applies to every control attribute…
You can add parameters to the returned model. For example:
then, in your example.jsp:
Still, it looks like you’re trying to implement ideas taken from component-based framework using an action-response one, which might not be the best idea.