Param attribute usage in @Result Annotation

481 Views Asked by At

How to specify the variables to be converted to JSON in @Result Annotation?

Now it is converting all variables with getters to JSON String.

How to use params attribute in @Result?

@Action(value = "save", results = { @Result(name = "success", type = "json") })
1

There are 1 best solutions below

0
On BEST ANSWER

I think this should work:

@Result(type = "json", params = {
            "includeProperties",
            "var1,var2"
        })