Home JAX-RS Mixing @FormParam and MultivaluedMap<String, String> formParams
Reply: 0

JAX-RS Mixing @FormParam and MultivaluedMap<String, String> formParams

user914
1#
user914 Published in April 23, 2018, 9:32 am

I've a method that returns all records sons of a father record (document and rows for example):

public Datasource<Son> getSonsFromParent( @FormParam(value = "idparent") Long idparent,
        MultivaluedMap<String, String> formParams) throws Exception;

I've a well known parameter, "idparent". I want to get this parameter simply using @FormParam . It's useful for exposing this method to other people: they know that a "idparent" is required.

Also, I have a number of undefined parameters for sorting and filtering my datasource, for example

sort[0]=name

sort[1]=surname

filter[0][field]=name

filter[0][operator]=equal

filter[0][value]=Marc

The problem is : using @FormParam, the multivalue map is always empty.

How can i mix MultivaluedMap and @FormParam together ?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.460202 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO