PDA

View Full Version : Passing parameter to xaction query



mstacey
04-18-2007, 01:12 PM
Hi,

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?

thanks

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

In my action-definition I needed to add

action-input
key type="string"
action-input

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);