I have a gadget that consumes a REST resource via AJAX call:
args: [
{
key: "version",
ajaxOptions: function ()
{
return {
url: "/rest/daysleftinversionresource/1.0/days-left-in-iteration/getVersion",
data: {
projectId : gadgets.util.unescapeString(this.getPref("projectId")),
}
};
}
}
]
==> from the other side, the REST resource method is as follow
@GET //@AnonymousAllowed //@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Path("/getVersion") public Response getVersionMethod(@QueryParam("project_id") @DefaultValue("project-10000") String key) { Long projectId = Long.valueOf(key.substring("project-".length()));
The method is always taking the default value and a warning about parameters is being consumed by a servlet is raised and a recommendation to use @FormParam instead of @QueryParam is given.
I am confused and troied so many alternatives but couldnt find a solution how to transfer my param from Gadget to REST Method,.
Do you have any recommendation ?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.