struts.xml:
<action name="findTspNameIdMap"
class="cdot.oss.cmsat.gma.struts.ConfigureTspThresholdAction" method="findTspNameIdMap">
<result name="success" type="json">
<param name="includeProperties">result,tspNameIdMap.*</param>
</result>
<result name="error">pages/Error.jsp</result>
</action>
动作类:
public class ConfigureTspThresholdAction extends ActionSupport implements SessionAware, ModelDriven<GmaThresholdParameter>{
private Map<String,Object> session;
private String operatorId;
private Map<String,String> tspNameIdMap;
private String result = "success";
//private List<String> thresholdParameters;
GmaThresholdParameter gmaThresholdParameters = new GmaThresholdParameter();
我对该操作进行了 AJAX 调用,当我在 Firebug 中检查 JSON 响应时,它是:{}
. 但是,如果我这样做<param name="root">tspNameIdMap</param>
,它会起作用,但不会includeProperties
。
早些时候它正在工作,但我做了一些代码更改(与上述代码部分无关)并且它停止工作。代码更改包括实现ModelDriven
POJO。
为什么不工作?有什么帮助吗?