Skip to content

Commit

Permalink
Merge pull request #96 from erdlet/88-add-accessor-for-hidden-method
Browse files Browse the repository at this point in the history
Add getter in MvcContext for hidden method field name
  • Loading branch information
erdlet authored Apr 30, 2023
2 parents c51e4cd + 32205fc commit f6c0af5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/src/main/java/jakarta/mvc/MvcContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ public interface MvcContext {
*/
Csrf getCsrf();

/**
* Get the name of the hidden field that is required for the {@link jakarta.mvc.form.FormMethodOverwriter}.
*
* @return the custom name set by using {@link jakarta.mvc.form.FormMethodOverwriter#HIDDEN_FIELD_NAME}
* or the default value in {@link jakarta.mvc.form.FormMethodOverwriter#DEFAULT_HIDDEN_FIELD_NAME}.
*/
String getHiddenMethodFieldName();

/**
* Get the built-in encoders.
*
Expand Down

0 comments on commit f6c0af5

Please sign in to comment.