I will try to be as specific as possible.
I have an action with two methods, one called through ajax and the other through a regular submit.
The fact is that it is impossible to receive a request from a regular submit, I only get action properties.
public class ClientAction{ @SMDMethod public Map<String, Object> findClient(String myParam){ ... } public String saveClient(){ Map<String, String[]> parameterMap = this.getRequest().getParameterMap(); } }
getRequest from saveClient returns null !!! But why??? I did not declare this with @SMDMethod
and here is struts.xml
<action name="client" class="myCompany.ClientAction"> <interceptor-ref name="customJSON"><param name="enableSMD">true</param></interceptor-ref> <result type="json"><param name="enableSMD">true</param></result> </action>
I made all the other announcements. I used to have two separete classes, one for each method, but with ClientAction and ClientActionJSON disproportion was not easy.
Any thoughts on how to use both methods, one ajax and the other not, in the same class.
source share