Properly render sort variable variable as composite.
HateoasSortHandlerMethodArgumentResolver now renders the sort template variable as composite to properly indicate that it can be submitted multiple times. Fixes GH-2531. Original pull request GH-2945.
This commit is contained in:
committed by
Oliver Drotbohm
parent
78267402bf
commit
fa9d7bdce7
@@ -35,6 +35,7 @@ import org.springframework.web.util.UriComponentsBuilder;
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @author Nick Williams
|
||||
* @author Julien Béti
|
||||
*/
|
||||
public class HateoasSortHandlerMethodArgumentResolver extends SortHandlerMethodArgumentResolver
|
||||
implements UriComponentsContributor {
|
||||
@@ -58,7 +59,7 @@ public class HateoasSortHandlerMethodArgumentResolver extends SortHandlerMethodA
|
||||
|
||||
String description = String.format("pagination.%s.description", sortParameter);
|
||||
TemplateVariable.VariableType type = append ? REQUEST_PARAM_CONTINUED : REQUEST_PARAM;
|
||||
return new TemplateVariables(new TemplateVariable(sortParameter, type, description));
|
||||
return new TemplateVariables(new TemplateVariable(sortParameter, type, description).composite());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user