views:

59

answers:

0

Idefined my struts xml as follows:

"<"action name="index" method="execute" class="hr.credo.web.struts2.action.Index"> <"result name="success" >/index.jsp <"/action> <"action name="hello" class="hr.credo.web.struts2.action.Index" method="JSON"> <"result name="success" type="json" > <"/action>

and in my action class i have an execute, JSON and getBlaBLa method all return success. if i invoke the action from my jsp as follows: <"sj:datepicker id="date" displayFormat="dd.mm.yy" name="date" onchange="jQuery(\"#gridtable\").jqGrid('setGridParam',{ url:\"/hello\",postData:{ date: $(\"#date\").val()}, search:true}).trigger(\"reloadGrid\")" >

both the JSON and getBlaBla get executed although i put in my hello action method="JSON" Why is this? I am able to invoke single method if the result is not type json, am i missing something?