My UI is a jquery grid. How can I send a parameter to the function (that creates my query) on click from my UI jquery grid?
For example, if this was my grid: http://www.ok-soft-gmbh.com/jqGrid/OK/formEditOnDoubleClick-jqueryui-showlink.htm#
I would want the client name sent to the query to use as a filter. The next page (not google link, as shown in the example when a client is clicked on) would have a grid that only listed companies with that client.
How do I create a query with this functionality?
I want to know how to send a parameter from my UI to the back-end query function.
EDIT ****
Here's what I came up with -
Inside of the UI code (that creates the jqgrid):
function returnHyperLink(cellValue, options, rowdata, action)
{
return '<a id="myLink" href="#" onclick="callCompanies(\''+cellValue+'\');">'+cellValue+'</a>'
}
function callCompanies(cellValue) {
$("#contents").load("jsp/companies.jsp");
}
and then in the back-end code:
I add
@GET
@Path("/{cellValue}")
to the top of my function and eventually can use cellValue to filter the query, like:
+ " where a.evt_type_id = cellValue " + "and "