Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Definitely an open issue on Spring, but doesn't look like its going to be addressed soon.</p> <p>Here is what you can do.. its not straight forward though, so weigh the cost vs benefit before you start :)</p> <ol> <li><p><code>RequestDataValueProcessor</code> will not work for you, you already know that. The way the <code>FormTag</code> is programmed, it calls specific methods (hooks) from the value processor at specific times, during the execution of the form tag.</p></li> <li><p>You can create your own custom form tag, which will do everything Spring's form tag does, either by composition or inheritence. But in addition, you can call your own Value Processor esque class when the form method is detected by the tag. This class can then decide what additional steps you want to take and you can then use the regular ValueProcessor to add hidden fields as you see fit.</p></li> </ol> <p>These questions talk about how to extend spring's tags, by creating your own: <a href="https://stackoverflow.com/questions/14415484/springmvc-custom-form-tags">SpringMVC Custom Form Tags</a> and <a href="https://stackoverflow.com/questions/13097778/create-custom-tag-library-which-extends-spring-tag-library">Create a custom tag library which extends the Spring tag library</a>.</p> <p>Also look at the source code of the <code>FormTag</code> <a href="https://github.com/SpringSource/spring-framework/blob/master/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java" rel="nofollow noreferrer">https://github.com/SpringSource/spring-framework/blob/master/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java</a>. See how the protected processAction method calls the value processor hook, you'll have to do something similar, but in the <code>getMethod</code> method.</p> <p>Hope this answer makes sense, let me know if you want me to re-phrase or elaborate any point. Happy programming!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload