View Full Version : Passing parameter to xaction query

04-18-2007, 01:12 PM

Probably a very simple thing I'm missing, I have a http request parameter that I need to pass to the sql query in an xaction as part of the where clause.

where key = {PREPARE:key}

I have created an input to the action called key with 'request' as the source and the key is part of the http request to the jsp containing the ChartHelper object. The error message is that "key" has a NULL value.

Should I be passing it in to SimpleParameterProvider in the jsp or via some other mechanism?


04-19-2007, 06:09 AM
Yip - was something silly:

In my action-definition I needed to add

key type="string"

I hadn't spotted this as I needed to edit the XML rather than use the Solution Designer.

as well as add it to the SimpleParameterProvider in the jsp:

parameters.setParameter("key", key);