My question is related to data binding in Spring using a command object. I am using the SimpleFormController.
I have a command object which has a few drop down list and text input elements that are bound to it. This works fine and when the user selects an option from the list or enters text, the values are being bound to the command.
Now I want to click on a hyperlink and bind it to the command too - so that I know in my controller that this link was clicked. I have in my jsp
In the above I have a variable int showAllAction; defined in my command pojo.
The problem is that the anchor <a> element does not have the "value" attribute defined for it, so I get a warning in the jsp. My command variable "showAllAction" is null always, and I cannot identify when the hyperlink is clicked. Since both <input> and <option> elements have the value attribute I do not face any problems here.
There must be a way to bind other elements like hyperlinks etc to the command object? Does anybody know how?
If not is there any workaround for this? Any help much appreciated!