users@jersey.java.net

[Jersey] Formparam for Non-String Fields

From: Cemo Koc <cem.koc.fwd_at_gmail.com>
Date: Wed, 16 Dec 2009 11:07:49 -0800 (PST)

Hi,

I would like to use FormParam for my bean as it described in jersey
documents and mail list. But I have a little problem in usage of non-string
fields. It returns (400) for such kind of fields if I use empty string.

My simple example like this

public class AccountBean {

    @FormParam("acc.type")
    private Integer type;

}



My simple question will be about default behaviour of these fields. IMHO,
the request values which can not be injected into fields should not return
400. Simply null values or @DefaultValue should be injected into fields.

Maybe another solution could be making all fields String but I am not sure
that it is a good practice.

Any thoughts about this?

Thanks





-- 
View this message in context: http://n2.nabble.com/Formparam-for-Non-String-Fields-tp4177365p4177365.html
Sent from the Jersey mailing list archive at Nabble.com.